Post by pietnlindy » Sun Aug 04, 2019 4:28 pm

Hi Everyone and thank you in advance for all help.

I am trying to increase my GTmetrix performance scores and have found a problem with the way I am enabling browser caching in my htaccess.
If I remove the # from any of the lines below the cart does not automatically update.
I need to press F5 to see the items delete or appear after adding.
Any suggestions would be greatly appreciated.


<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
# ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
# ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
# ExpiresDefault "access 1 month"
</IfModule>

I have found a work around.
A free account with Cloudflare CDN https://www.cloudflare.com/plans/
Just enabling it raised my score from Pagespeed of 79 up to 96 and my Yslow from 69 to 88
Still a bit of work to do though....
Last edited by pietnlindy on Sun Aug 04, 2019 4:53 pm, edited 1 time in total.

New member

Posts

Joined
Thu Jul 25, 2019 4:06 pm

Post by letxobnav » Sun Aug 04, 2019 4:41 pm

well, expire for javascript is fine but you do not want to have an expire for html in there, so get rid of it.

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


Active Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by pietnlindy » Sun Aug 04, 2019 4:52 pm

letxobnav wrote:
Sun Aug 04, 2019 4:41 pm
well, expire for javascript is fine but you do not want to have an expire for html in there, so get rid of it.
even if I remove the # from
# ExpiresByType text/x-javascript "access 1 month"

it causes the cart to act strange.

I have found a work around.
A free account with Cloudflare CDN https://www.cloudflare.com/plans/
Just enabling it raised my score from Pagespeed of 79 up to 96 and my Yslow from 69 to 88
Still a bit of work to do though....

New member

Posts

Joined
Thu Jul 25, 2019 4:06 pm

Post by letxobnav » Sun Aug 04, 2019 4:55 pm

I was talking about your html expire:

ExpiresByType text/html "access 1 month"

if you keep that in there not even cloudfare or your god can help you.

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


Active Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by pietnlindy » Sun Aug 04, 2019 5:26 pm

letxobnav wrote:
Sun Aug 04, 2019 4:55 pm
I was talking about your html expire:

ExpiresByType text/html "access 1 month"

if you keep that in there not even cloudfare or your god can help you.
YEP...That is why I never removed the # from it....
Thanks anyway

New member

Posts

Joined
Thu Jul 25, 2019 4:06 pm

Post by letxobnav » Sun Aug 04, 2019 6:25 pm

on a side note, don't count your blessings on cloudflare, that is a cdn which is great if you service static content or media files and such that can easily be cached and delivered from different locations other than your website.

The benefit of a cdn for highly dynamic content like e-commerce is extremely limited as any request for dynamic content to the cdn is simply relayed to your web site as the cdn cannot cache what you cannot cache or the browser cannot cache, resulting in just another hop in the network.

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


Active Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: No registered users and 16 guests