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

James (Tech Support)
JDHL Technologies
P.S. your 5 star experience is our goal. Please contact our team to assist you with any concerns.

Leave a Reply

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