Jump to content

HTTP Request Headers


Redshirt

Recommended Posts

Redshirt

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...