Pentarou Posted February 5, 2020 Share Posted February 5, 2020 Hello, We use Prestashop 1.7.6.2, changes made to CSS are not displayed to customers after clearing the cache and even manually clearing the cache in the var/cache folder. When our customers clear their browser cache or press CTRL + F5, the changes are visible. As you can imagine, customers will not understand this, we need customers to see changes immediately after clearing the cache. How do I do this? Please note that no server-side caches are enabled that cause this. Link to comment Share on other sites More sharing options...
El Patron Posted February 5, 2020 Share Posted February 5, 2020 if you use CCC of .css, and make change to .css, and smarty is set to recompile if updated then visitor will get new ccc .css file. Link to comment Share on other sites More sharing options...
Pentarou Posted February 5, 2020 Author Share Posted February 5, 2020 Hi El Patron, We use CCC and set the option to recompile templates if the files have been updated, but it doesn't seem to do that, neither does forcing compilation or deleting cache manually. Our custom.css file is not loaded when I enable Smarty Cache for CSS, so that option is not even enabled, but if it is disabled, our custom.css file is loaded. The debugging mode shows no errors and neither does our server log. Link to comment Share on other sites More sharing options...
Pentarou Posted February 7, 2020 Author Share Posted February 7, 2020 I solved both problems. The custom CSS was loaded, but got corrupted by a missing bracket in one of the style sheets of the custom module of the theme that we use. Strangely enough, this problem ensured that the style sheets at our customers were not refreshed after the cache was emptied. Link to comment Share on other sites More sharing options...
El Patron Posted February 7, 2020 Share Posted February 7, 2020 not running CCC of .css in 1.7 has a bit of impact on performance, 1.7 introduced one CCC of .css for all pages. happy selling Link to comment Share on other sites More sharing options...
Mickael Posted February 9, 2020 Share Posted February 9, 2020 Pentarou, is your problem solved? There's something I don't understand about the CTC. For example, when I access my site, my browser loads the name of the compiled css file "...assets/cache/theme-8e09ea26.css". When I clear the cache, the file is then deleted from my server. But if I reload my page, the browser always loads the same file "...assets/cache/theme-8e09ea26.css" and it is on my server again. As the file name is identical, my browser will not load it from my server but uses the cached file. Link to comment Share on other sites More sharing options...
Pentarou Posted February 9, 2020 Author Share Posted February 9, 2020 Hi Mickael, Yes the problem is solved. Custom.css was loaded, but was cut due to a missing bracket in one of the CSS files of the module from my theme, which somehow also prevented the cache from being refreshed properly to our customers. Try emptying prestashop/var/cache/* and the cache folder inside your theme's directory manually. Link to comment Share on other sites More sharing options...
Mickael Posted February 9, 2020 Share Posted February 9, 2020 I did it, but it's still the same file that is rebuilt. Link to comment Share on other sites More sharing options...
Peter Liska Posted November 15, 2020 Share Posted November 15, 2020 On 2/9/2020 at 1:00 PM, Mickael said: I did it, but it's still the same file that is rebuilt. Try to clean your css cache directory: /themes/[your theme]/assets/cache/ And probably these too: /themes/[your theme]/cache/ /var/cache/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now