Get Free Audit

Magento Tips: How To Make Browsers Update And Refresh The Theme Files

Feb 15, 2013

490 Aliaksandr Simonchik

Magento Tips: How To Make Browsers Update And Refresh The Theme Files

Sometimes after making changes to the website design it is required that users’ browsers would update and refresh the theme files. To solve this issue it is possible to implement the versioning of static files. For instance, one can add a parameter with the theme version number.

So what we need to do is to add the parameter specifying the version number.

We have: http://test.com/js/prototype/prototype.js

It will become: http://test.com/js/prototype/prototype.js?ver=2

To do this, we need to override Mage_Page_Block_Html_Head and change the method of forming addresses of theme static files:

Andrey_Dubina
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey

Static Version

Download Static Version from GitHub

Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *