Support

Admin Tools

#12475 Cache Expiry

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Tuesday, 29 May 2012 11:17 CDT

user64122
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? yes
Have I searched the tickets before posting? yes
Have I read the documentation before posting (which pages?)? yes
Joomla! version: (2.5.4)
PHP version: (5.3.13)
MySQL version: (5.2)
Host: (optional, but it helps us help you)
Admin Tools version: (2.2.6)

Description of my issue: Currently your system plugin adding a file cache options in htaccess like this...

ExpiresByType text/css "now plus 1 week"
ExpiresByType application/javascript "now plus 1 week"
ExpiresByType application/x-javascript "now plus 1 week"

but Yslow plugin don't detect the expiration date and cut the points for this.

If we mention like this, then what's your thought on this....this helps SEO?


Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT"

nicholas
Akeeba Staff
Manager
First it's not the system plugin adding anything. It's an option in .htaccess Maker, a different feature of the Admin Tools Professional component :) If YSlow doesn't pick up a change it's because your web server does not load the mod_expires Apache module. You can ask your host to enable it. It may require an Apache update as well. Regarding SEO, it doesn't really matter. Search engines look at the overall "weight" of the page, they don't currently care about caching headers. Their point of view is understandable: someone coming to your site from a search engine is most like a first time visitor, so caching wouldn't make any difference for him.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user64122
Thanks for your prompt reply. mod_expire is enabled.

root@server [~]# httpd -M | grep expire
expires_module (static)
Syntax OK

But Yslow still showing Add Expires headers

nicholas
Akeeba Staff
Manager
I would simply use Firebug or Chrome's Web Developer Tools to examine the HTTP headers. Is there an expires header sent?

Moreover you have to consider that YSlow may be picking up that the dynamic content of your page (.php files) do not have expiration headers. The .htaccess file will not add such headers to dynamic content. In fact it would be wrong if it did. It only adds expiration headers to specific static media types.

Another two pitfalls. The way the generated .htaccess is written, it will only add expiration headers based on MIME Types. If the server doesn't resolve the MIME type of various files the default expiration (+1 hour) will be added. Moreover, the expiration is not set months or years into the future. CSS and JS files are set to have a short expiration time of 1 week. Otherwise most components would break for all your visitors as soon as you updated a component (very few, if any, components use a versioning query string with site resources).

Finally please note that YSlow is optimised for huge sites, with billions of unique visitors per month, managed by very big, dedicated IT teams. The suggestions it generates are geared towards that audience. You don't need to set expiration headers in the far future and you don't need to use a CDN (typical suggestions), or even combine all CSS and JS files or use sprites. Yes, if you can do all of that it's cool and great, but think about it. In order to implement all of the suggestions you have to fork the entirety of the software running on your site and modify the crap out of it. For every new Joomla! or extension update you'd have to rewrite your modified code. Is this huge trouble worth the 100-300 msec you're going to shave off each visitor's load time? It does if you have billions of uniques per month (as it also translates to several Terabytes of data saved) but it is irrelevant in our tiny to small websites.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!