Redshirt 1487 Posted December 24, 2012 Posted December 24, 2012 I'm trying to get an HTTP 302 out of the server for a week now. I'd love some direction as to what headers to use. If I set "Cache-Control" to "only-if-cached" then it always pulls from the cache. If I get no image then I try again with "Cache-Control" set to "max-age=0". This is far less than optimal because it means the client will never check for new images once it has a cached copy. I've tried "if-not-modified" which doesn't seem to do anything. The request is still made to the server and a HTTP 200 generated. I'm thinking the combination of "only-if-cached" + "max-stale=1209600" (14-days) will work best for me, but I'd still like to see the performance cost of validating with the server before I go that route.
Luke 40079 Posted December 25, 2012 Posted December 25, 2012 Don't you mean 304? 302 is a redirect code. I haven't added support for if not modified but I can. Try if modified since to get a 304
Redshirt 1487 Posted December 25, 2012 Author Posted December 25, 2012 your right that was a typo. It's 304
ebr 15667 Posted December 25, 2012 Posted December 25, 2012 Http caching doesn't appear to be working at all right now. I brought up latest client and server and the UI was re-downloading images every time they went off screen - very slowly.
Luke 40079 Posted December 25, 2012 Posted December 25, 2012 Yea, the server's fine, but for some reason the ui is not caching the response. I'll get to it soon when i'm back in the ui.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now