Skip to content

client js version number in request... expires headers returned #558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
getify opened this issue Oct 5, 2011 · 3 comments
Closed

client js version number in request... expires headers returned #558

getify opened this issue Oct 5, 2011 · 3 comments
Labels
enhancement New feature or request

Comments

@getify
Copy link

getify commented Oct 5, 2011

See: https://twitter.com/#!/rauchg/status/121402676234817536

Basically, the request is it would be nice to specify a version number for the client (browser) js file, and in so doing, have the file automatically served with far-future caching headers.

@3rd-Eden
Copy link
Contributor

3rd-Eden commented Oct 5, 2011

Adding a Expires is good idea, but I don't think we should do that by default for the /socket.io/socket.io.js path. We could detect if the user has a version number in the path /socket.io/socket.io.v0.8.4.js and then add a agressive Expires header to the request.

This ways old behavior will be unchanged and more advanced caching will be made possible for those who want it.

(We might want to do the same for the WebSocketMain.swf file, but that is probably a bit harder to detect :-))

@getify
Copy link
Author

getify commented Oct 5, 2011

you shouldn't do both ETag and Expires... only do one or the other. It seems fine to do ETag as the default. This specific request was, if you put a version number in the URL of the .js file, that instead of it doing an ETag, it did a far-future expires.

@3rd-Eden
Copy link
Contributor

3rd-Eden commented Oct 5, 2011

Yeh I know because the Etag will still force the browser to do a check on the server. Which is something we are trying to avoid here.

It should be fairly easy to add because of the new static module we have rewritten. I can see if can get it fixed tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants