Expires Headers / Leverage Browser Caching

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
Jazzi
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Sun Nov 19, 2006 12:56 am
Location: UK
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by Jazzi » Sun Sep 08, 2013 9:50 pm

seaside man wrote:does anyone have the code for joomla 3.1
Htaccess rules should work fine regardless of the version of Joomla installed. I have 3.1 and they certainly worked for me... ;)
Paul E. Web Designer & Developer / Joomla Guy
http://joomlaguy.co.uk

seaside man
Joomla! Guru
Joomla! Guru
Posts: 698
Joined: Thu May 08, 2008 2:55 pm
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by seaside man » Mon Sep 09, 2013 10:37 am

what should my htaccess file look like to increase speed
In2town Magazine is a popular magazine covering celebrity gossip, travel news, lifestyle news, gadget news and so much more. visit http://www.in2town.co.uk

User avatar
Jazzi
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Sun Nov 19, 2006 12:56 am
Location: UK
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by Jazzi » Mon Sep 09, 2013 11:06 am

seaside man wrote:what should my htaccess file look like to increase speed
Honestly, it will vary from server to server - sorry! I changed mine a bit, based on hours and hours of online research and repeated testing on both PageSpeed and YSlow... Here's what I now have in mine (right at the start, before the Joomla default code):

Code: Select all

# Expires Control
ExpiresActive On
ExpiresDefault A0
<FilesMatch "\.(ico|gif|jpg|jpeg|png|swf|svg|woff)$">
ExpiresDefault A1209600
Header append Cache-Control "public"
</FilesMatch>
<FilesMatch "\.(xml|txt|html)$">
ExpiresDefault A7200
Header append Cache-Control "proxy-revalidate"
</FilesMatch>
<FilesMatch "\.(js|css)$">
ExpiresDefault A259200
Header append Cache-Control "proxy-revalidate"
</FilesMatch>
Header unset ETag
FileETag None
Hope that helps! :)
Paul E. Web Designer & Developer / Joomla Guy
http://joomlaguy.co.uk

seaside man
Joomla! Guru
Joomla! Guru
Posts: 698
Joined: Thu May 08, 2008 2:55 pm
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by seaside man » Mon Sep 09, 2013 2:39 pm

what server do you use
In2town Magazine is a popular magazine covering celebrity gossip, travel news, lifestyle news, gadget news and so much more. visit http://www.in2town.co.uk

User avatar
Jazzi
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Sun Nov 19, 2006 12:56 am
Location: UK
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by Jazzi » Mon Sep 09, 2013 3:47 pm

Mine's a Site5 Reseller server running Apache and PHP 5.3.

Meant to say: it's down to what Apache modules are running on a server - you'll need to ask your host that, but you basically need mod_header...
Paul E. Web Designer & Developer / Joomla Guy
http://joomlaguy.co.uk

seaside man
Joomla! Guru
Joomla! Guru
Posts: 698
Joined: Thu May 08, 2008 2:55 pm
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by seaside man » Mon Sep 09, 2013 4:07 pm

i have a dedicated server which is Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
In2town Magazine is a popular magazine covering celebrity gossip, travel news, lifestyle news, gadget news and so much more. visit http://www.in2town.co.uk

User avatar
Jazzi
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Sun Nov 19, 2006 12:56 am
Location: UK
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by Jazzi » Mon Sep 09, 2013 6:24 pm

That doesn't help with knowing if mod_header is installed and enabled though - for that you'll need to ask your host...
Paul E. Web Designer & Developer / Joomla Guy
http://joomlaguy.co.uk

seaside man
Joomla! Guru
Joomla! Guru
Posts: 698
Joined: Thu May 08, 2008 2:55 pm
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by seaside man » Tue Sep 10, 2013 12:11 pm

hi, i have been told it is installed
In2town Magazine is a popular magazine covering celebrity gossip, travel news, lifestyle news, gadget news and so much more. visit http://www.in2town.co.uk

User avatar
Jazzi
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Sun Nov 19, 2006 12:56 am
Location: UK
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by Jazzi » Tue Sep 10, 2013 1:25 pm

The you should be fine with the code I use. Personally, I'd run your site through both PageSpeed and YSlow before you make the changes - then you'll be able to gauge just how successful (or not) they've been.
Paul E. Web Designer & Developer / Joomla Guy
http://joomlaguy.co.uk

seaside man
Joomla! Guru
Joomla! Guru
Posts: 698
Joined: Thu May 08, 2008 2:55 pm
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by seaside man » Fri Sep 13, 2013 10:29 am

not seeing any changes
In2town Magazine is a popular magazine covering celebrity gossip, travel news, lifestyle news, gadget news and so much more. visit http://www.in2town.co.uk

User avatar
Jazzi
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Sun Nov 19, 2006 12:56 am
Location: UK
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by Jazzi » Fri Sep 13, 2013 11:34 am

seaside man wrote:not seeing any changes
Did you run a page through both PageSpeed and YSlow before you added the code? If you did, did the scores not change at all?

Does URL rewriting (friendly links) work on your site?
Paul E. Web Designer & Developer / Joomla Guy
http://joomlaguy.co.uk

hhorton
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Wed Jun 20, 2012 9:23 am
Location: Mojacar, Spain
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by hhorton » Thu Oct 16, 2014 12:47 pm

My website uses png files on most of its pages and the pond files are regularly updated. My pages are set up to load particular .png files and all I have to do is to upload and overwrite the previous png file and it is then updated on the page. No page editing to do.
If I have the system cache plugin for pages set to no and have png files in my .htaccess file set to a month, does that mean that if I update a png file it won't change despite the no page caching?

internetuser
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sun May 18, 2014 5:52 pm

Re: Expires Headers / Leverage Browser Caching

Post by internetuser » Mon Nov 17, 2014 3:25 pm

hi
i have tried about everything mentioned in this forum to fix the leverage browser caching issue but nothing has changed so far , some codes gave me a 500 errors , others basically didnt make any improvement .
could it be because i'm placing the code at the bottom of the .htacess file ! where exactly is the code suppose to be added !
Thanks

User avatar
roma64
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 110
Joined: Mon Feb 12, 2007 12:18 pm
Location: Reading, PA
Contact:

Re: Expires Headers / Leverage Browser Caching

Post by roma64 » Tue Feb 10, 2015 5:29 pm

@laborduck!

I am not sure what problems you were having with JCH Optimize! I use JCH Optimize PRO and it is working extremely good! Depending on which template you use, there are configuration that needs to be set correctly and if not, your site's template will brake!

I use JCH Optimize on every site I design and with any template and don't have the problem you were experiencing!

JCH Optimize PRO is good and very cheap ($5 or $10) and I highly recommend it! If you decide to re-install it and still having problems with your template breaking up, I can help you with that!

Peace
SimplerWebs

the apprentice
Joomla! Guru
Joomla! Guru
Posts: 801
Joined: Wed Nov 18, 2009 3:53 pm

Re: Expires Headers / Leverage Browser Caching

Post by the apprentice » Thu Nov 26, 2015 9:26 am

I have the expires headers plugin, which I have left with the original default parameters, and also this code at the bottom of the .htaccess:

<IfModule mod_headers.c>
Header unset ETag
Header unset Last-Modified
</IfModule>
FileETag None
<FilesMatch "\.(ico|gz|JPG|jpg|jpeg|png|gif|js|css|swf)$">
Header unset Cache-control
Header set Expires "access plus 1 month"
</FilesMatch>


Does it make sense or conflicts?


Locked

Return to “Administration 1.5”