Depending on the documentation, you can use expires to complete
The instruction adds a Expires and a cache-control to the header of the response: (If the time is a negative no-cache, the reverse max-age = #, # is the number of seconds you specify the time) information
If you do not want to cache a page, you can use expires-1; Use this relative to the header inside with Cache-control:no-cache; After testing, under IE 6,8 normal work, F5 refresh each response status code is 200, but firefox,chrome, F5 refresh is still 304, view the response header information also has Cache-control:no-cache, The page was still cached, and later, when viewed through HttpWatch, noticed a warnning with the content "the ' no-cache ' directive was used without the ' no-store ' directive. Using ' No-store ' ensures that Firefox would always re-fetch HTTP based pages and never use a previous version. " Then the Nginx configuration inside added a add_header cache-control no-store; And then test, in ie6,8, Firefox,chrmoe can be successfully cached. Further testing, found that as long as the set of No-store, do not no-cache, even if the expires time is positive, there will be no cache
In addition, if the previous page is already cached, set not cache, also restart the server, in IE, with F5 refresh or return 304, unless CTRL+F5 return 200, if you want to take effect immediately, it is best to modify the page, let the browser know that the page has been updated to retrieve the page content.
This article is from "Smile_ Youth" blog, please be sure to keep this source http://smileyouth.blog.51cto.com/7273768/1640423
Nginx Configuration Cache No-cache No-store