Support

Admin Tools

#12195 .htaccess maker and css files

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 on Thursday, 07 June 2012 18:00 CDT

user27991
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

Database Version: 5.1.41-3ubuntu12.10
PHP Version: 5.3.2-1ubuntu4.9
Joomla! Version: Joomla! 1.5.23 04-March-2011 18:00 GMT
Admin Tools version: (latest)

Description of my issue:

I am using .htaccess maker on our website www.asafeworldforwomen.org
And have been working on the speed of the site
I have been testing using https://developers.google.com/pagespeed
And am getting a good high score of 90

In the recommended changes it mentions
'Specify an expiration at least one week in the future for the following resources:'
Amongst the resources mentioned are several css files we use as well as .js files

In our .htaccess file it says
# CSS and JS expiration: 1 week after request
ExpiresByType text/css "now plus 1 week"
ExpiresByType application/javascript "now plus 1 week"
ExpiresByType application/x-javascript "now plus 1 week"

Which I think means that .css files and .jss should be covered

We are using a .cdn system which images and .js files are being pushed through
(I am not sending the .css files because of some conflicts)
Does Google not recognise the .ht access when we use a CDN system?

But having said that - the css files aren't going through the CDN - so I am baffled!

Thx in advance

Andrew


nicholas
Akeeba Staff
Manager
Hi Andrew,

Ehen you activate the "Set default expiration time to 1 hour" option in the .htaccess Maker and click on the Save and Create .htaccess we add exactly that kind of .htaccess directives to the generated .htaccess but with an expiration time of 1 hour, not 1 week. In fact, I would suggest against using a longer timeout on a Joomla! site. The next time you update a component or modify something in the CSS files of your template you don't want your visitors to experience a broken site for one week unless they clear their browser's cache. One hour is enough to ensure adequate caching in real life conditions without becoming a nuisance. Remember that Google's suggestions apply to sites where the web master is using custom code (not off the shelf components), making it possible to add versioning tags and/or different file names every time you update something on your site.

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!

user27991
Hi Nicholas
Thx for that
I am a little puzzled though why for instance Mootools is not showing as having any expiration on it
or rather this link on the cdn doesn't have
http://asafeworld.higheffectdesign.netdna-cdn.com/.../mootools-1.2.5.js 

shows as (expiration not specified)

nicholas
Akeeba Staff
Manager
That is a question for the CDN provider. Please note that the .htaccess file only controls how your site's web server will serve the files. When the files are transferred to the CDN and served from the CDN, it's the CDN's responsibility to set the expiration headers. For example, when I upload static files (e.g. packages for download) to our CDN I use the default expiration time of 24 hours. When I upload time-sensitive data (e.g. update information) I use an expiration time of 1 hour. These settings are honoured by our CDN (CloudFront) and sent with the HTTP headers by the CDN's servers. In your case, it sounds like the CDN doesn't send that information. Please ask your CDN provider. Most likely it's a configuration option.

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!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

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!