2

I having an issue with a css file. I remove some css code from a class and it does not change after refresh in the browser. I clear the var cache folder multiple times. I removed all of my cache from the beginning of time from my browser. I clear the cache from admin panel. I tried on multiple browser. But nothing changed. If I rename/remove the css file and i refresh the page it ignores the content of my file. This is what i did wih my class:

.topbar .logo {
        /*margin-left: -25px;
        display: block;
        width: 230px;
        height: 230px;*/
}

So any ideas, What I should try more, on enterprise ?thx

1

Firstly, understand the role of caches on your store. You should never be manually flushing caches in a blind panic in a hope to get something working.

None of the Magento caches are related to CSS files. The only feature that would relate to it is CSS combine, FPC and block cache.

CSS combine will detect file changes and update accordingly, if I recall correctly, the block cache for the html head has a zero lifetime, so should update the minified URL accordingly. I'd need to test, but I believe FPC on the other hand would require invalidation/refreshing to force an update.

But if you aren't using CSS combine, it means you should never refresh the Magento store cache to reflect a simple file change.

First, check the obvious. Visit the stylesheets URL directly, if you see your change, then great. If you don't, then append some arguments to the URL (eg. ?v=1), this will force browser cache invalidation and punch through any reverse proxy caches you might be using server side (eg. Varnish/Nginx/Apache).

Finally, and the most likely, are you sure you are actually editing the right file? 9/10 times I see enquiries like this, it is simply because the wrong file is being edited.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.