no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | website_optimization [2012/02/16 05:33] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Website Optimization ====== | ||
+ | * [[Optimization]] | ||
+ | |||
+ | * [[http:// | ||
+ | |||
+ | |||
+ | ==== PHP Caching ==== | ||
+ | |||
+ | Anytime PHP uses a session, it applies the setting in '' | ||
+ | |||
+ | Caching is disabled by default when sessions are used. The preferred approach would be to set it globally to '' | ||
+ | |||
+ | The length that the browser is told to cache its contents is set by the '' | ||
+ | |||
+ | Here are the headers each setting sends: | ||
+ | |||
+ | **nocache (default)** | ||
+ | |||
+ | Disables caching in the browser completely. | ||
+ | |||
+ | < | ||
+ | Expires: Thu, 19 Nov 1981 08:52:00 GMT | ||
+ | Cache-Control: | ||
+ | Pragma: no-cache | ||
+ | </ | ||
+ | |||
+ | **public (preferred)** | ||
+ | |||
+ | Lets the browser cache the contents of the webpage. | ||
+ | |||
+ | < | ||
+ | Expires: (sometime in the future, according session.cache_expire) | ||
+ | Cache-Control: | ||
+ | Last-Modified: | ||
+ | </ | ||
+ | |||
+ | **private** | ||
+ | |||
+ | Prefers that a proxy handle caching. | ||
+ | |||
+ | < | ||
+ | Expires: Thu, 19 Nov 1981 08:52:00 GMT | ||
+ | Cache-Control: | ||
+ | Last-Modified: | ||
+ | </ |