Asset optimization gives css files that are deleted too quickly
-
Hello,
I have an issue with Humingbird’s asset optimization feature.
WP Core version : 5.8.1
Humingbird free version : 3.11
Asset optimization configuration :
Automatic
Speedy
Files : CSS only
Exclusion : many files generated by elementor (which are too often modified)I use Asset optimization to concatenate and minify some of the CSS used by my website. Most of the time it works well and files like [my_site]/wp-content/uploads/hummingbird-assets/94baf3fd53ef0a1acf231d839d0febb5.css are served.
But sometime, a css file becomes suddenly no longer available and give a 404 which break the design of the whole page. I use page cache (not the one provided by Humingbird because my host already provide this feature) and if I clear the static html cache, then the html decide to load a new concatenated css.
I guess that this is because a change has been made with the files that are being used to generate the concatenated css. So it’s normal for Hb to generate another concatenated css sometimes. But does it have to immediately delete the old css ? I should precise that my html cache is already automatically cleared every 4 hours.
In this log extract, we can see that a css is generated from some files. And just after, another css is generated from the same files.
[2021-10-12T16:40:39+00:00] Processing group: wphb-1 (handles: theplus-front-css, plus-pre-loader-css, hello-elementor, hello-elementor-theme-style, elementor-icons, elementor-frontend) [2021-10-12T16:40:39+00:00] Asset elementor-frontend [styles] has been successfully processed. [2021-10-12T16:40:39+00:00] Minify style elementor-frontend [2021-10-12T16:40:40+00:00] Group optimized, hash: 58c5cb74c0f1ffc8e9b32be400010aa0
[2021-10-12T16:41:04+00:00] Processing group: wphb-1 (handles: theplus-front-css, plus-pre-loader-css, hello-elementor, hello-elementor-theme-style, elementor-icons, elementor-frontend) [2021-10-12T16:41:04+00:00] Asset elementor-frontend [styles] has been successfully processed. [2021-10-12T16:41:04+00:00] Minify style elementor-frontend [2021-10-12T16:41:05+00:00] Group optimized, hash: 957f72cf2ec2a7045c7bf9709b2cba1e
The thing is, after 16h41 (UTC) 58c5cb74c0f1ffc8e9b32be400010aa0.css was no longer available and give a 404.
You say in your documentation (https://wpmudev.com/docs/wpmu-dev-plugins/hummingbird/#asset-optimization) that old concatenated files are not removed immediately to avoid conflicts. It doesn’t seem to be the case there. Is there a way to avoid HB deleting 58c5cb74c0f1ffc8e9b32be400010aa0.css immediately ?Thank you
- The topic ‘Asset optimization gives css files that are deleted too quickly’ is closed to new replies.