-
AuthorPosts
-
October 13, 2011 at 11:43 am #169625
Hello,
is there a way to set a last-modified header for the joined js and css files?
jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
October 13, 2011 at 11:46 am #419053<em>@mojorisin 275571 wrote:</em><blockquote>Hello,
is there a way to set a last-modified header for the joined js and css files?</blockquote>
Hi
Would you mind explain a little bit what’s “last modified header” ?
Thank you
Viet VuOctober 13, 2011 at 12:20 pm #419057Sure…
I came across this issue while checking and optimizing my JAT3 template with Google’s Page Speed:
“Last-Modified and ETag. These specify some characteristic about the resource that the browser checks to determine if the files are the same. In the Last-Modified header, this is always a date. In the ETag header, this can be any value that uniquely identifies a resource (file versions or content hashes are typical). Last-Modified is a “weak” caching header in that the browser applies a heuristic to determine whether to fetch the item from cache or not. (The heuristics are different among different browsers.) However, these headers allow the browser to efficiently update its cached resources by issuing conditional GET requests when the user explicitly reloads the page. Conditional GETs don’t return the full response unless the resource has changed at the server, and thus have lower latency than full GETs.
It is important to specify [..] one of Last-Modified or ETag, for all cacheable resources. It is redundant to specify both [..] both Last-Modified and ETag.”
Source: http://code.google.com/intl/de-DE/speed/page-speed/docs/caching.html#LeverageBrowserCaching
You can check the header of your document with http://www.web-sniffer.net
At this point the joined css and js files are the only files on my website which are still missing a last-modified tag. I could easily add a last-modified tag by using htaccess or httpd.conf. However this date will be static. I’m more interested in setting a last-modified header with dynamic PHP date. Each time I clean the JAT3 cache in Joomla backend it should automatically set a last-modified header for the joined css and js file. This would be the best solution.
jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
October 14, 2011 at 5:59 am #419233Oh i see. One of method for web optimizing.
Actually at moment we have not yet applied that code into our code. I’ll mention this one to dev team 🙂
Thank you for report.
Viet Vu -
AuthorPosts
This topic contains 4 replies, has 2 voices, and was last updated by jooservices 13 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum