rpeters83 Posted January 2, 2008 Share Posted January 2, 2008 I have a PHP site that naturally includes some CSS and JS files into the HTML. However, sometimes, I can save a CSS or JS file, and it does not show up on the website (e.g., if I change a CSS style in common.css, it does not get reflected on the website). It seems to do it randomly - most of the time the changes are reflected just fine. I can modify the PHP files just fine, it just seems to be CSS and JS files that are referenced. Even if I delete the file and re-save it, it does not reflect the changes. I can run "iisreset" and changes are not reflected. Furthermore, changes are not reflected in any browser I use, on any machine on the network - so it has to be something with PHP or IIS (though I have never experienced this before with IIS using .net). If I rename the file, and rename the link in the PHP code, it gets reflected. But, I cannot change it back, as it still seems to cache an old CSS file. This happens in FF, Safari, and IE7. Can anyone give me any idea as to what the heck is going on here? This is making it very hard to develop. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/84114-phpiis-stylesheets-and-js-files-get-cached-and-cannot-be-changed/ Share on other sites More sharing options...
revraz Posted January 2, 2008 Share Posted January 2, 2008 Not really PHP related, because it doesn't care about CSS files, but you sure it isn't your browser? Once you upload a new file, all contents are replaced. Try setting your Browser to check for a new version each time you load a page instead of Automatic. I know my site works instantly when I change any CSS setting. Quote Link to comment https://forums.phpfreaks.com/topic/84114-phpiis-stylesheets-and-js-files-get-cached-and-cannot-be-changed/#findComment-428165 Share on other sites More sharing options...
rpeters83 Posted January 2, 2008 Author Share Posted January 2, 2008 Not really PHP related, because it doesn't care about CSS files, but you sure it isn't your browser? Once you upload a new file, all contents are replaced. Try setting your Browser to check for a new version each time you load a page instead of Automatic. I know my site works instantly when I change any CSS setting. So far I rebooted the server and tried browsers on a bunch of machines. I cleared cache. I even loaded the CSS file directly into the browser and it's still displaying an old version. I open the file on the server itself and it reflects changes I made to it, but those changes are not being displayed in the browser window. So, perhaps it is not a PHP related question then, still, very odd... Quote Link to comment https://forums.phpfreaks.com/topic/84114-phpiis-stylesheets-and-js-files-get-cached-and-cannot-be-changed/#findComment-428180 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.