The x-generated-css file is loading a lot of css inline that I want to load through wp_enqueue_style to reduce DOM load. How can i disable the x-generated-css stylesheet and copy the css to a stylesheet I can load with wp_enqueue_style?
Hi @allcal,
Thanks for reaching out.
It would require custom development, and it will only lessen the size of the initial page size but the browser will still download it while the page is already loaded causing some slight of flashing (page without style). You may improve it a bit
but part of it may suffer.
Please check these https://varvy.com/pagespeed/inline-small-css.html, https://www.wpfaster.org/blog/how-to-use-autoptimize-inline-and-defer-css-option (even plugin optimization has that option), https://blog.futtta.be/2014/02/13/should-you-inline-or-defer-blocking-css/
And since Wordpress is a platform where themes and plugins are from a different author, then it’s completely unavoidable. Which is why I recommend using a plugin for this kind of optimization if you wish to combine them and put on external CSS. Like this https://aoxoa.co/inline-defer-render-blocking-css-autoptimize/
Thanks!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.