Sorry. I was mistaken about JCH.
The JCH_Optimize didn't work with the css and js files for my chosen template package.
Using the plugin to compress, minify, and/or combine css and js files broke my chosen template but not other template. It works well with other template. I'm no longer using JCH Optimize, just the rests that were mentioned with the same settings.
Thank you for the FileEtag MTime Size code.
I didn't know cache could be used with it.
I'm using this code now because I want my extra cache.
ka-cink cink.
Will save hosting $ haha:D
...........................
For the expire heading problem, the code below, added under the "RewriteEngine On" line in .htaccess, works for me with or without Appache mod_rewrite under Joomla's global setting.
It might work for you and others too. Wanna try it out?
Code: Select all
ExpiresActive on
ExpiresDefault "access plus 10 years"
or
Code: Select all
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 10 years"
</IfModule>
or
Code: Select all
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 3 days"
</IfModule>
It's based on
http://developer.yahoo.net/blog/archive ... anc_2.html, reply from technical support and this code below.
ExpiresActive On
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 2 years"
ExpiresByType image/jpeg "access plus 2 years"
ExpiresByType image/png "access plus 2 years"
ExpiresByType text/css "access plus 2 years"
ExpiresByType text/javascript "access plus 2 years"
ExpiresByType application/x-javascript "access plus 2 years"
ExpiresByType image/ico "access plus 2 years"
I have no fundamental understanding of what the code means. It's working well, based on GTmetrix.
The code below is another method from Daniel, a technical support responder. I didn't use it because cache for 10 years seems more and because things are working
Hello,
Thank you for the update.
I have checked the mod expires functionality by creating new folder named test and new .htaccess under the mentioned folder. I have typed this code:
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/gif "access plus 1 months"
ExpiresDefault "access plus 1 days"
</IfModule>
The first directive, ExpiresActive on, simply informs that the module should be used. The second and third are the important ones:
* ExpiresByType image/gif "access plus 1 month" informs that documents of the type image/gif should be reloaded from the web server one month after the document was last accessed.
* ExpiresDefault "now plus 1 day" informs that all document types that are not specified should be reloaded one day from the current time.
You can use the popular text-based web browser lynx to verify that your settings are working and in effect. I have checked the folder using the lynx browser:
HTTP/1.1 200 OK
Date: Thu, 24 Dec 2009 06:13:53 GMT
Server: Apache/1.3.41 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.31 OpenSSL/0.9.8b mod_status
/0.2mm
Cache-Control: max-age=86400
Expires: Fri, 25 Dec 2009 06:13:53 GMT
Connection: close
Content-Type: text/html
Note the Cache-Control: max-age=86400 line. This shows 86400 seconds, echo 86400/60/60/24|bc outputs 1 (bc is a nice command line calculator, manual page) meaning the text/html is set to expire after 1 day - as ordered.
Thus I can confirm that the mod expires works on the server. Please use the following format to specify the files' type:
ExpiresByType image/gif "access plus 1 months"
and the issue should be resolved.
If you need further help, do not hesitate to contact us again.
Best Regards,
Daniel K.
Technical Support Team
--------------------------------------------
Check out our Friends Special: