Tuesday 10 March 2009 8:43:43 am
Hi, I'm trying to set Cache-Control header to my web pages. First I've read these topics:
http://ez.no/developer/forum/setup_design/setup_httpheadersettings http://ez.no/developer/forum/setup_design/httpheadersettings_content_type_application_xhtml_xml and the comments in [HTTPHeaderSettings] in site.ini. The form of my URI is: http://mysite.com/xxx/mypage (without .html at the end)
I use a virtualHost as describe in this doc: http://ez.no/doc/ez_publish/technical_manual/3_8/installation/virtual_host_setup For now, I can configure Cache-Control for images, javascripts, css, etc ... but not at all for pages with MIME «text/html» In httpd.conf (Apache 1.3.41 - eZP 3.10.1) I have:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 30 days"
ExpiresByType image/jpg "access plus 30 days"
ExpiresByType image/jpeg "access plus 30 days"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/x-icon "access plus 30 days"
ExpiresByType text/html "access plus 2 days"
ExpiresDefault "access plus 40 days"
</IfModule>
But the line:
ExpiresByType text/html "access plus 2 days" has no effect. I always get:
GET /eZ-publish HTTP/1.1
...
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
If-Modified-Since: Tue, 10 Mar 2009 14:48:00 GMT
HTTP/1.x 200 OK
Date: Tue, 10 Mar 2009 14:48:40 GMT
Server: Apache/1.3.41 (Unix)
Expires: Tue, 10 Mar 2009 12:48:40 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Tue, 10 Mar 2009 14:48:40 GMT
...
I've tried many other MIME types but without success So I've set HTTPHeaderSettings in override/site.ini.append.php like this:
[HTTPHeaderSettings]
CustomHeader=enabled
HeaderList[]
HeaderList[]=Cache-Control
HeaderList[]=Pragma
HeaderList[]=Expires
Cache-Control[]
Cache-Control[/]=10000;2;5
But this doesn't product any result. Thanks for your help. Pascal
Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish
|