Force Browser Refresh for CSS Files, Normal Images and Background images

Here are my examples for forcing the web browser to display your most current updates for CSS Files, Normal Images and your Background images. Remember you will need to change the version numbers each time you want your new changes to be forced to everyone viewing your app or web page.

Test Code Examples:

<link rel="stylesheet" href="test.css?v=1234">
<img src="images/test.jpg?v=1234" alt="Test">
background: url(../images/test.png?v=1234);

Advanced Automated CSS:
<link rel="stylesheet" href="css/test.css?<?=filemtime('css/test.css');?>">

Again, just change the ?v=1234 to a new number like ?v=1235

Regards,
James (Tech Support)
Get Pixel Conversions API on the Shopify App Store
P.S. your 5 star experience is our goal.
Thanks again from all of us here at Pixel Conversion Pro and remember, you are Awesome!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.