Hi. I'm evaluating MODX by trying to replicate an existing site. I've set up a template with chunks for header and footer and so on. My CSS is in a folder called "stylesheets" just below the root. I click on "View my site" and up it comes. So far so good.
The problem arises when I modify the CSS. The changes don't show on the site. I clear the cache - no difference. I clear the browser cache - no difference. I rename the CSS file - it works!
Has anyone come across this before? I have looked in the forums and cannot see it mentioned.
Revolution, the latest version (can't remember the exact number - downloaded last week)
Running under WAMP, 64-bit version, on Windows 7 64-bit Home Premium
I have been trying to set up a Wayfinder menu, and it appears that it is only in connection with it that I'm having the problem. It must be to do with how Wayfinder connects to the CSS. Not a MODX problem after all.
Sometimes you have to manually delete the files in the core/cache directory before things will update. It's also possible that WAMP (or your browser) is doing some caching as well.
Reloading the page with Ctrl-F5 might update it if it's the browser.
-
☆ A M B ☆
- 24,524 Posts
MODx does not cache the .css files at all - these are fetched by the browser with a different request to the server when it sees the links to them in the web page, as are image files and .js files. Any caching problems will occur in the browser, or perhaps in an ISP's proxy caches somewhere - I have had that problem a few times. It mostly depends on the server's configuration and what HTTP headers it is configured to send to the browser about caching the various files.
There are some tricks in generating unique names in the links that can work around this issue.
http://stackoverflow.com/questions/460389/browser-caching-of-css-files
Good point. I *think* most browsers will reload everything with Ctrl-F5, but I'm not sure.