if I set up the expire http header of a css file to 1 year, if I modify that file, will it be ignore

Posted by user39511 on Server Fault See other posts from Server Fault or by user39511
Published on 2010-04-02T01:44:40Z Indexed on 2010/04/02 1:53 UTC
Read the original article Hit count: 281

Filed under:
|
|
|
|

I'm using rails with nginx/passenger.

If I set up the expire http header of a css file to 1 year, if I modify that file, will it be ignored by the browser (ie, it will not request the new version)?

Given that Rails adds a different timestamps to each asset such as foo.css?1270165626 every time I restart the server?

That's the config I use right now (nginx/passenger):

    location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
            expires max;
            break;
    }

© Server Fault or respective owner

Related posts about nginx

Related posts about rails