Sunday 21 October 2007 12:06:08 pm
Regarding the Expires header, ¿how can the home page be identified?
See http://ez.no/developer/articles/ez_publish_performance_optimization_part_3_of_3_practical_cache_and_template_solutions/cacheable_headers "Cacheable Headers" of "Practical Cache and Template Solutions" I give a real world example but simple. There's a website that has three levels: the home page, sections that list articles, and the articles. I want everything to expire in the future except listings (level 2) and specially the home page (level 1), which is the page that changes more often. So I want that articles (level 3) return 172801 as an Expires. And listings (level 2), and specially the front page (level 1), return -7200. 172801 means 48 hours plus 1 second, which is (I read somewhere) the minimum value that YSlow, the Firebug optimization plugin, takes as a "good far future" Expires header. Say the sections are /a/ and /b/. With this configuration, I've succeded in making eZ Publish to put negative Expires on section listings /a/ and /b/, and a positive Expires on the third level (the articles), and was yet amazed by ez Publish, once again! But the home page is still expiring in 48 hours from now, as the articles:
[HTTPHeaderSettings]
CustomHeader=enabled
Expires[]
Expires[/]=172801
Expires[/a]=-7200;0 Expires[/b]=-7200;0 I tried identifying the home page with a Expires[/content/view/full/2]=-7200, but it doesn't work. If anyone knows if this could be done.
|