北京时间:
 
 
 首页 
 
 
 
 
 
 
 洛杉矶论坛 
   
洛杉矶华人论坛 |  搜索  |  注册  |  登陆  |  FAQ 
 
 
How to disable Etag in Apache

 
发表新帖   回复帖子    洛杉矶华人论坛 首页 -> 技术交流
阅读上一个主题 :: 阅读下一个主题  
留言
How to disable Etag in Apache  引用并回复
 
发布人: Mrs LA   发布于: 2008/02/01, 7:28 pm

Entity tags (ETags) are a mechanism to check for a newer version of a cached file.

Problem may caused by Etag:

1. When using server farm, it may cause lower cache rate for different server generate different etag

2. Server need to check last modified time & etag to validate one file

By removing the ETag header, you disable caches and browsers from being able to validate files, so they are forced to rely on your Cache-Control and Expires header. Basically you can remove If-Modified-Since and If-None-Match requests and their 304 Not Modified Responses.

If you can access httpd.conf, you can add

FileETag None

Or if you can access .htaccess only, you can add

Header unset ETag

FileETag None

If you use both Last-Modified and Etag before, it will cause all cache reload after you remove etag




_________________
支持洛杉矶华人,点评洛杉矶华人商家
返回页首
阅览成员资料 (Profile) 发送私人留言 (PM)
从以前的帖子开始显示:   
点评这篇文章
 
1 2 3 4 5
1个人参与评分
发表新帖   回复帖子    洛杉矶华人论坛 首页 -> 技术交流 论坛时间为 PST (美国/加拿大)
1页/共1   
转跳到:  


 
Copyright 2006-2008 www.ChineseInLA.com All rights reserved. Privacy Policy