im having trouble whit my css, when i save i cant see the changes on my page. Sometimes the changes shows after i have closed my computer and starts it up again do anyone else have experience that???
-
☆ A M B ☆
- 24,524 Posts
Sounds like a problem with your browser cache. I usually make sure my browser is set to not cache anything when I'm developing a site.
http://stackoverflow.com/questions/460389/browser-caching-of-css-files
If you are loading the CSS file in code, you can also cachebust the CSS file by appending a unique query to the end of the CSS filename:
$fileName = 'assets/css/myfile.css?var=' . time();
$modx->regClientCSS($filename);
Since it's a different filename every time, the browser will never cache it.
If you're not injecting the CSS file in code, you can just change the reference to it by adding ?var=something to the css filename in the link and changing the "something" every time you edit the CSS file.
i have removed cache from the browser, but im still having trouble saving min css :/
Is it possible that you're editing the wrong CSS file or saving it to the wrong place?
Do a "View Source" on the page and see where the actual CSS file it's using is located.
no im have the right path to the file. this is realy wierd
I often have that problem in Chrome, but not in Firefox (which I have set not to cache anything).
You could set the page itself to uncached on the Settings tab.
It's extreme, but you can also delete all the files in the core/cache directory when you make a change (or install the CacheClear snippet and use that). That will make sure that MODX is not delivering CSS from the cache.
I second Bob, MODx and Chrome have weird, sporadic caching issues... I generally program in firefox and normally don't have any issues. I think the caching issue is more prevalent with Mac Chrome.
I LOVE MODX! | greyskymedia.com