VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Themes & Layout Problems and Customization VM 1.1 => Topic started by: jenkinhill on October 05, 2010, 17:36:03 pm

Title: How to clear cached CSS in Firefox
Post by: jenkinhill on October 05, 2010, 17:36:03 pm
CSS caching can be a problem when testing style changes on a web page using Firefox. To ensure you clear any cached css in Firefox make a new bookmark (any will do) in the browser, right click on the bookmark link and replace the Location: with the following code:

Code: [Select]

javascript:void(function(){var%20i,a,s;a=document.getElementsByTagName('link');for(i=0;i<a.length;i++){s=a[i];if(s.rel.toLowerCase().indexOf('stylesheet')>=0&&s.href)%20{var%20h=s.href.replace(/(&|%5C?)forceReload=d+/,'');s.href=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+(new%20Date().valueOf())}}})();


To clear css while viewing a web page, just click on the bookmark. The page refreshes having reloaded css from the server.