How to set nginx cache headers to never expire?

Viewed 4964

Right now I'm using this:

location ~* \.(js|css)$ { # |png|jpg|jpeg|gif|ico
  expires max;
  #log_not_found off; # what's this for?
}

And this is what I see in firebug:

enter image description here

Did it work? If I didn't get it wrong, my browser is asking for the file again, and nginx is answering 'not modified', so my browser uses the cache. But I thought the browser shouldn't even ask for the file, it already knows it will never expire.

Any thoughts?

2 Answers
Related