Jump to content

Force browser to refresh CSS files


Recommended Posts

Hello guys,

 

 

im not talking about clearing smarty cache, file cache, memchache or module cache.. but only CSS in cache' browser of the customer after a css modification.

 

The only way is either to change css file name either to do some file versioning.

 

Actually, so many years after prestshop creation, this feature is still not available. 

 

Do someone have a good solution for this ?

 

 

I will try this but im a bit disapointed doing it in 2017 :

https://www.prestashop.com/forums/topic/136126-auto-versioning-css-files-force-css-refresh/

 

Link to comment
Share on other sites

if you use CCC of .css and you make a .css change.  This will change the sever side cached CCC'ed.css file.

 

thus new visitors would be served a new CCC .css file.  

 

you should only experience issue described for orphaned .css that is not being CCC'ed.

  • Like 2
Link to comment
Share on other sites

Hello El Patron,

 

yes you are right, thank you.

 

We havent used CCC for css for a while because it slow down (very slightly) the speed, at least on most the website i checked. But yes in this case it is worth to use it.

 

Thank you again dear Legend !

 

I recommend CCC...this just removes a lot of http(s) requests and in general is better to use than not.  In 1.7 we get one CCC for .js and .css files...this add 'slight' latency to first visit but 'significantly' speeds up all subsequent page loads...it's probably the most significant feature introduced by 'any' CMS and reason I stick with PS through thick and thin.  

 

for example, if visitor transverse 4 'differnt' pages, home/product/checkout/order confirm...they are served 4 CCC .js/.css files...in 1.7...there  is only one...incredible.  

Edited by El Patron (see edit history)
  • Like 1
Link to comment
Share on other sites

Only one in 1.7 ? Nice ! 

 

For speed, everyone should get this module : https://addons.prestashop.com/fr/performance-site/7939-page-cache-v3.html

(of course i guess you know it already)

 

Since i discovered it i make every website with prestashop, even if it is not a e-shop 

 

I do not recommend using 'any' static cache module or a cloudfare type solution.  A well tuned PrestaShop on well tuned server does 'not' require vodoo...:)

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...