Created
October 20, 2014 14:00
-
-
Save lanceon/99b906226c4111c91b35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Always specify an Expires header. It will normally be set to -1 for immediate expiration of HTML pages or a date well into the future for other resources such as images, CSS and Javascript. | |
In practice, caching ‘forever’ typically means setting an Expires header value of Sun, 17-Jan-2038 19:14:07 GMT since that’s the maximum value supported by the 32 bit Unix time/date format. If you’re using IIS6 you’ll find that the UI won’t allow anything beyond 31-Dec-2035. | |
Use Cache-Control: no-cache for dynamic HTML pages | |
Use the Last-Modified header with the current file time for static HTML | |
For all other file types set an Expires header to the maximum future date your web server will allow | |
"All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception." | |
Thus, any server sending timestamps in the HTTP headers, which are not sent in GMT would be considered defective. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment