Support

Admin Tools

#15756 set expiration time

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 Monday, 15 April 2013 09:47 CDT

jjst135
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.9
PHP version: 5.3
MySQL version: (unknown)
Host: (optional, but it helps us help you)
Admin Tools version: latetst

Description of my issue:

HI, i'm trying to set some directives in the .htaccess file in my joomla websites to control the caching of files. I added thes lines to the .htaccess file, but ran into the same problem I had before with the Admin Tools option "Set default expiration time to 1 hour" This was in ticket #12690.

You mentioned:
++++++
Thank you for the site access! It seems that the "Set default expiration time to 1 hour" option is not compatible with your server. It causes the server to tell the browser to cache the edit links, despite Joomla! sending proper non-cache HTTP headers, triggering the session issue. Just keep that option disabled in .htaccess Maker and you'll be fine.
+++++++++

Could you tell me what I could to to make my server compatible with this option?

With regards,
Jip.

nicholas
Akeeba Staff
Manager
Hello Jip,

Well, it's been 10 months and over 3100 support tickets since then. I really don't remember what I had found :) Reading my replies I can suppose what could be wrong. That feature requires the Apache mod_expires module to be installed and activated. You either had a very old version of Apache which doesn't support that module or you simply need to enable this module in your Apache configuration. Please note that this is a server-wide change which has to be performed by your host.

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!

jjst135
Hi Nicolas,

Thanks for our reply.

I believe I do have mod_expire installed and working. When I add this to .htaccess it seems to work fine:
++++++++++++++++++++++++
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 60 days"
ExpiresByType image/png "access plus 60 days"
ExpiresByType image/gif "access plus 60 days"
ExpiresByType image/jpeg "access plus 60 days"
ExpiresByType text/css "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType audio/x-wav "access plus 1 month"
ExpiresByType audio/mpeg "access plus 1 month"
ExpiresByType video/mpeg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/quicktime "access plus 1 month"
ExpiresByType video/x-ms-wmv "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
</IfModule>
++++++++++++++++++++++

Except when I add add a default expire like this:

ExpiresDefault "access plus 2 days"

it seems that Joomla get 'confused'. After opening (edit link) an article two times, the third time result in an error message: "You are not permitted to use that link to directly access that page (#15).".

Same thing happens with the Admin Tools option 'Set default expiration time to 1 hour'. I guess this option is also adding a default expire to .htaccess.

The other ExpiresByTime lines work, because I can test this in ySlow or with Pingdome Tools. So I guess mod_expires is working. (Apache 2.2.24)

I could just leave out the default, but I would rather know why this is not working ;-) Not very urgent though...


nicholas
Akeeba Staff
Manager
That's a good question. What you describe shouldn't happen. Maybe you're using some Joomla! plugin which somehow modifies the HTTP headers sent, putting expiration headers into the far future? I can't see how else that could happen.

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!