Get Free Audit

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

Feb 15, 2013

369 Aleksander Tretjak

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:

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

Static Version

Download Static Version from GitHub

Vlad Yunusov
Partner With Us Looking for a partner that will help you to grow your business? We are the right company to develop your webstore. Feel free to get in touch with us. We will be happy to discuss your business opportunities and provide you with a Free Quote. Talk to Vlad

Post a new comment

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