How to set nginx cache headers to never expire?

caching, http-headers, nginx

Solution

Do not use F5 to reload the page. Use click on the url + enter, or click in a link. That's how I got only 1 request.

Problem

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: 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?

Original source