Jump to content
thirty bees forum

Force clear chrome cache?


vzex

Recommended Posts

Ugh, spent way too much time wondering why images and changes were not showing up in my chrome browser on a mac when I had all the TB performance settings set to no cache.

Even hit the performance clear cache button as well!

Chrome was the culprit! Had to clear browsing data!

Is there a bit of code that can be added to TB to force chrome or all browsers for that matter to load the most current page version?

I want shoppers to get the most recent updates not something they cached previously that may be out of date.

Link to comment
Share on other sites

Thanks @lesley

Think I found my answer here: https://varvy.com/pagespeed/cache-control.html

So this added to htaccess file would force a refresh after one month?

One month for most static assets

Header set Cache-Control "max-age=2628000, public"

Link to comment
Share on other sites

Thanks @moy2010 that didn't work for me command + R for mac :)

I'm more worried about someone buying an item with an older image expecting the older image item :( Wanted to force THEM to see the newest version without having to refresh themselves

I don't shop websites by refreshing to see newest version, so maybe this isn't really an issue.

Link to comment
Share on other sites

Unfortunately thirty bees has inherited this problem from Prestashop.

The correct way to do this technically is by using so called 'asset versioning'. This gives you the best of both worlds, maximum caching in the browser, and immediate reload of new versions when things change server-side.

It's going to be a massive change to get this done in thirty bees.

So we have to live with setting a mostly-correct max-age mixed with manual browser reloads for now.

Link to comment
Share on other sites

Ah okay, thanks @roband7

How long is TB coded before it will clear cache?

So changing htaccess for one month clear cache would not work the way TB is coded?

Header set Cache-Control “max-age=2628000, public”

When I installed the giftcard module to test I quickly added a test image, then when I wanted to change it to a real image I wanted to use I just could not get rid of it even after deleting it in cpanel. Refresh/reload did nothing. The only thing that worked was to clear browsing data in chrome.

Safari and firefox showed correct image.

Link to comment
Share on other sites

@vzex I'm with you there, 100%. Mac (and maybe PC) Chrome never refreshes until you clear everything each time you make a change. Simple shortcuts do not work. For this reason, I check my site by constantly clearing all history in FF and Safari because I don't want to clear Chrome after each change. When I do that, I have to go back and enter all my 2FA's as well as all the regular logins (Of course I use a password vault, before anyone says anything about that). Too time-consuming.

I'm not so sure about the article you found Vzex because that page is dated March 2016.

I'm looking forward to a resolution to this situation because I know that customers will not realize they have to refresh their browsers if we happen to update something while they're shopping, for instance.

(side note for @lesley - if I misinterpreted this, also, I'm staying out of discussions because 3 strikes and I'm out. Nah. lol)

Link to comment
Share on other sites

@alwayspaws seeing the most current version might not be important for say screw and nail images :) but for handcrafted or say clothing where the stitching or fabric changes slightly it's definitely needed! Don't want to get a customer saying it's not as described...Oh? did you clear your chrome cache?

You have to make it easy to extract money from customers not make them jump through quirky internet hoops :) I'm thinking a how to browse this store FAQ might be needed.

Cookie cutter images that are valid for years don't fit the bill for everyone. I'd rather accurate than fastest on the block to be honest.

I'm thinking the only way around it is to change the product listing to a new product instead of just changing the image?

I've not tried changing htaccess yet just in case it's a definite no by the way TB is coded don't know which is the higher boss for cache! :)

Link to comment
Share on other sites

@vzex Exactly! as far as "extracting money" from customers! :)

If you create a new product, you may lose some google juice.

As @Havouza told me long ago (2 months in TB time!), people don't read docs, so I'm not sure of the FAQ option, either. That will make them jump through hoops, too.

We need a way to do this that we can understand (or, me, anyway!). I'm unclear about cache, also. I'll be watching this forum closely!

Link to comment
Share on other sites

This is likely a problem that will never be fixed, it is pretty much how the web works.

@roband7 As for resource versioning, it actually does for the resources that matter. The css and js files are versioned by their hash. The images files, with the exception of the files that are used for theme design, are served from a different url on update. Those two things should help with any cache issues. The only other thing I can recommend is to always change the resource url on update of a slider or theme image.

Link to comment
Share on other sites

@lesley said in Force clear chrome cache?:

The only other thing I can recommend is to always change the resource url on update of a slider or theme image.

@vzex - how do you like the quoted part of the solution?

That's a great idea! This way we aren't losing anything in rankings because we're not creating a whole new URL. Is this correct, @lesley? If we are changing the whole URL, it's not what I want.

Link to comment
Share on other sites

@lesley Just to be sure I understand, if I change my image for a product and then update that product's URL, it won't affect rankings, correct? The rankings change would only happen if we rename the URL of the product, itself. Is this right? Because i have been writing and overwriting products for two years now and I have to stop it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...