Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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;
    }
share|improve this question
    
Yes that would be an issue, I would recommend taking that feature off if possible. Wordpress does the same thing, it bugs me cuzz I can't get rid of them! –  Kyle Apr 2 '10 at 2:51

1 Answer 1

It would ignore it until the file name changes. So if the file name only changes when you restart your webserver then you'd have to restart it for any changes to apply.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.