Changeset 18187 for branches/comu-ver2/data/class/pages/LC_Page.php
- Timestamp:
- 2009/07/13 14:05:51 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/pages/LC_Page.php
r18143 r18187 308 308 309 309 /** 310 * クライアントのキャッシュを許可する. 311 * 312 * session_start時のno-cacheヘッダーを抑制することで 313 * 「戻る」ボタン使用時の有効期限切れ表示を抑制する. 310 * クライアント・プロキシのキャッシュを制御する. 314 311 * 315 312 * @access protected 316 * @return void 317 */ 318 function allowClientCache() { 319 $cache_expire = session_cache_expire() * 60; 320 header('Pragma:'); 321 header('Expires:'); 322 header("Cache-Control: private, max-age={$cache_expire}, pre-check={$cache_expire}"); 323 header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 313 * @param string $mode (nocache/private) 314 * @return void 315 */ 316 function httpCacheControl($mode = '') { 317 switch ($mode) { 318 case 'nocache': 319 header('Pragma: no-cache'); 320 header('Expires: Thu, 19 Nov 1981 08:52:00 GMT'); 321 header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); 322 header('Last-Modified:'); 323 break; 324 325 case 'private': 326 $cache_expire = session_cache_expire() * 60; 327 header('Pragma: no-cache'); // anti-proxy 328 header('Expires:'); // anti-mozilla 329 header("Cache-Control: private, max-age={$cache_expire}, pre-check={$cache_expire}"); // HTTP/1.1 client 330 header('Last-Modified:'); 331 break; 332 333 default: 334 break; 335 } 324 336 } 325 337
Note: See TracChangeset
for help on using the changeset viewer.