Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: HTTP Headers max age.  (Read 4405 times)

Offline thedarksyde

  • Full Member
  • ***
  • Posts: 131
  • Karma: +7/-1
    • View Profile
HTTP Headers max age.
« on: March 31, 2015, 05:59:14 PM »
Tried to check speed of the site with google and this is the main issue it said.

"Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network."

It is mostly referencing every image that is loaded on the main page of the site, that they all could use cache expiry dates.  Is this something that can be done, or can you tell me where I would change this to make this happen?  The speed score is 35/100 for desktop and lower than 30 for mobile. 

Offline Gordon Taylor

  • Global Moderator
  • Full Member
  • *****
  • Posts: 150
  • Karma: +28/-1
    • View Profile
    • Natural Handcrafted Soaps
Re: HTTP Headers max age.
« Reply #1 on: March 31, 2015, 10:00:47 PM »
This is the beginning of Google's push to rank sites that are mobile compatible and give them more weight. (I'll be writing an article on this in the next few days.)

Having said that, it's also a function of your hosting company. My store ranks in the top 81% of all sites anywhere, for speed of page loads. That is because of the hosting company I use. The speed at which the store loads on computer or mobile device is most dependent on two things, the speed of the server and the connection speed of the user.

Additionally, you can't always tell when someone will clear their cache on their machine, many folks have their browsers set to clear it every time it closes. So, while it'll make some folks load faster if the cached images are dated, most folks won't notice a difference.
« Last Edit: March 31, 2015, 10:02:58 PM by Gordon Taylor »

Offline thedarksyde

  • Full Member
  • ***
  • Posts: 131
  • Karma: +7/-1
    • View Profile
Re: HTTP Headers max age.
« Reply #2 on: April 01, 2015, 10:48:51 AM »
Right but I could at least set my images to not expire for a month or more, and I am not sure how to do that.  That is what I am asking, is this something my hosting sets up, or is this something in the code for AbanteCart cart that I can change, or AbanteCart cart can make part of the settings?

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
Re: HTTP Headers max age.
« Reply #3 on: April 01, 2015, 11:15:32 AM »
here's a pretty good quide on this IMO.

http://gtmetrix.com/add-expires-headers.html

do notice the info bar on the right  'the impact of this performance improvement depends on how often users hit your pages with a primed cache.'

If you have lots of repeat visitors this will make a big improvement for their loading,  if mostly first time visitors - not so much.

If you read more of the recommendations on gtmetrix,  be sure to notice that some of their recommendations should be ignored for responsive design - where the css is managing some attributes.

Hope this helps you a bit.
Lee




Offline thedarksyde

  • Full Member
  • ***
  • Posts: 131
  • Karma: +7/-1
    • View Profile
Re: HTTP Headers max age.
« Reply #4 on: April 01, 2015, 12:00:28 PM »
That was a great little page, and was exactly what I was looking for, already improved my ranking by over 25. 

I know it also depends on the users settings and a lot of other things, but every little improvement helps with bandwidth. 


Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
Re: HTTP Headers max age.
« Reply #5 on: April 01, 2015, 12:18:02 PM »
glad it helped.

Here's another testing site I use in tandem with the gtmetrix -
http://tools.pingdom.com/fpt/

if you click on the down arrow on the right end of the links  -  you can find out how it is reading your expiration settings as a double check

Also,  if your hosting account provides the ability to use a LiteSpeed server I would suggest you look into it -  it drops in over Apache  and in my testing it significantly improves speeds and lowers bandwidth.   And after test for several weeks now on several installs and configurations  have found now conflicts.

Lee


 

Powered by SMFPacks Social Login Mod