Exploring the idea of optimizing CSS loading on my website by selectively including only the necessary styles. I am interested in eliminating unnecessary front-end CSS files and consolidating all used CSS from plugins into one minified file. This could potentially reduce the CSS file size by over half a MB.
I'm wondering if there is a method to dequeue all enqueued styles on the WordPress front-end and replace them with a single minified CSS file instead.
Any suggestions on how to achieve this goal? It's important for the CSS to continue loading as usual in the backend admin area.
It may sound unconventional, but the ultimate aim is to improve site speed, especially for mobile devices. The plan is to compile all necessary CSS for the site, cache it, and utilize a CDN for faster performance.