0

when we are referencing our css and html what normally happens is it does not loads the updated files from the server i know there are dozens of solutions on the internet about this issue but what do they do is load a specific file like css etc.what i want to do is to load the whole project from the server every time like css html etc.i found a solution to load css from the server every time a request is sent

<link rel="stylesheet" type="text/css" href="css/mystyle.css?d=<?php echo time(); ?>" />

but in many cases it happens that it does not auto load the html changes like images etc so i would have to do a ctrl+f5 to do a reload is there anyway that we can load the whole project from server?

uneeb meer
  • 596
  • 3
  • 14
  • Have you tried this option IE ->Tools -> Internet Options -> Browsing History (Settings) . Check the option 'Everytime I visit the webpage' – Thangadurai Jan 16 '17 at 12:08
  • that's for the client i want a solution so i can implement it from developer's end – uneeb meer Jan 16 '17 at 12:14
  • So you don't really want to reload assets when they change, you want to completely bypass every cache the user might benefit from? – Álvaro González Jan 16 '17 at 12:30
  • i want to reload assets on every refresh but when my development is complete then i will remove that portion so that caching will be active again – uneeb meer Jan 16 '17 at 12:42
  • Setting [cache-control headers](http://stackoverflow.com/a/4485194/3615478) might help. – Ankit Jan 16 '17 at 12:54
  • Ankit is right: if you only want to disable caching during development the most promising path is adding HTTP headers, something that can typically be accomplished with pure PHP or at web server level. – Álvaro González Jan 16 '17 at 17:00

0 Answers0