CSS Not loaded
-
As stated in another thread (solved, no reaction). From time to time the css is not loading when the cache regenerates itself. switching off/cleaning cache makes it work again. Free version.
You never know when it happens so your page is “unreachable” unnoticed. I had to switch off caching and are very interested on a fix. Cause WPO is not usable this way.
we are using wpml. Might be a part of the problem?
-
When this happens have you tried clearing your browser and DNS cache?
Sure. I also tried different browsers/Computer/Mobile. It’s a cache problem on the server. WP/WC uptodate. Astra theme Pro, wpml uptodate. I have no idea when and why it happens. As I see in the other threads I’m not alone with this problem but it’s very hard to find and debug (for me).
Can you try disabling your server cache?
You could also try force the server to find a fresh copy of the CSS file. To do this you will need to find all CSS files referenced on the page (all
<link rel="stylesheet">elements) and then change their URLs. Changing/some-path/style.cssto/some-path/style.css?rnd=132forces the browser to re-request the file from the server. Because of therndpart, neither the browser or the server have that request in the cache and are forced to grab a fresh copy of the fileHi, i don´t think there is a problem with finding the file on the server. If cache is cleared everything works fine. Sometimes recreating cache (frequency depends on WPO settings) creates the problem. There are some threads stating the same problem. I can´t deactivate server cache. It´s a shared server. But in my understanding this can´t be the problem. Please correct me.
why did you mark this thread as resolved? It isn´t …
I found out by examining the source html on one of the destroyed pages that
<link rel='stylesheet' id='wpo_min-header-4-css' href='https://xxxyyy.com/wp-content/cache/wpo-minify/1688447139/assets/wpo-minify-header-ed803e66.css' media='all' />do not exist. Any ideas?
The link above refers to minified cache. It’s possible its referencing an old minified file that has been removed.
Minified cache is automatically removed after 30 days, see Minify > > advanced. You change how long you keep stale minified files for here.
You can completely remove minified cache by doing the following, go to minify >> Advanced, you turn on “Enable debug mode”.
Then in Minify status, you’ll have a “Delete all the files generated by minify”.
This should purge everything.Please note that these files get purged automatically after 30 days (which is why the button is not always visible).
In the Minify status tab, you will also so an option to “increment cache”
There is then an option to “Increment cache” This will reset the files generated by minify but use the existing minify temporary files
Hi and thank you. I do not understand in detail what your mentioned settings do. I was asuming that WPO only link minified files in the html that are generated by WPO and therefore exists (and vice versa change the html accordingly if not anymore). Independent on how often you purge whatever cache. Could you elaborate? Thank you.
Minified CSS files do expire or can be deleted. When this, a happens a new folder is created for the newly minified CSS when someone visits the page: https://getwpo.com/faqs/what-does-reset-the-minified-files-actually-do/
If there is a window between the minified files being removed and someone visiting the page then the file cannot be found,
Could you also check your php error logs?
What is your current WP memory limit?
If you are using http2, I would recommend you switch of the minfication: https://isotropic.co/merge-and-minify-css-js-should-be-avoided-on-http-2-servers/
Have you tried simply disabling the minification rather than disabling the whole plugin?
Thank you,
wp-memory limit 512
errors in the log i haven´t checked in regards of WPO. The problem seems obvious. I regularly deleted the cache and set the number of days for stale cache to 0. I´ve always asumed it´s 100% logic only existing cache files are linked by WPO and when deleting cache those links are updated. Minified Cache grows up to 5-10 GB on one of my setups (when settings -> 30 days). Thats space no one wants to spoil. I might have to dig deeper into caching to understand better.
i deleted all minified cache according to your description, changed stale cache back to 30.
I´ll give it a try the next days/weeks and will get back if the problem is not fixed. Thanks again.
ps whats an optimum setting for Cache -> “cache life” and Minify -> “Cache Life”?
Because of nonces, I would say 8 hours for cache >> cache life
Apologies, I don’t see the cache life in the Minify tab?
minify -> advanced -> advanced options -> cache-life (freely translated from german)
it´s written there (in english, besides the rest is in german)
“In order to prevent broken pages when using a third party page caching, WP-Optimize keeps the stale minified cache for 30 days.
Enter 0 to never keep stale cache.”Thats why i´m wondering why setting 0 or 30 days should make any difference in regards of the missing minify files. I do not use any third party caching.
my settings right now are:
cache life -> 10 hours (will switch to 8)
minify cache-life -> 30 days (with me wondering if this helps with missing minify cache files)
Hi,
minify cache-life, apologies, I was looking at the wrong tab. I would set this to 30.
Third party caching – some plugins/themes use caching that you might not be aware of for example Elementor and WMPL
Thank you for the information. Lets see whats happening with the new settings.
Hi again. Setting life span in minify back to 30 days seems to solve the problem (at least for the last days during observation. I haven´t reached the 30 days yet). The new/old problem why i had set life span to much less days still persists. Right now, after a week or so, minify cache is back to 20 Gigs. I do not want to know where it lands in 30 days. This can´t be right. Please advice how to circumvent white pages, but keep the cache in an acceptable size.
The topic ‘CSS Not loaded’ is closed to new replies.