2010年3月4日 星期四

apache max-age 在 .htaccess

Add an Expires or a Cache-Control Header
Configure ETags
這是 Client Caching 技巧之一
header["Cache-Control"] = "max-age=600",就是 Content 在 600 秒內都是 valid 的.


至於如果最前面的 web server 是 apache 的話,還有一招是在 public/stylesheets 和 public/javascripts 下放置一個有以下內容的 .htaccess 。

    Header add Cache-Control "max-age=86400"

解釋很好~http://blog.xdite.net/?p=1045
1. max-age
2. etag
3. last_modified。

【下列文章您可能也有興趣】

沒有留言: