Hello,
I was optimizing the speed for my shopify store and in PageSpeed Insights, the section where it suggests to remove unused css it linked to an unknown css file which I searched for in my theme but it wasn't there. There wasn't any link to it in the theme either, so I am pretty confused right now. Can someone please help me?
PageSpeed linked to https://cdn.shopify.com/s/assets/admin/style-1e4c89dc02e18cd8df25a8cdec068d38922a7ddb8c9eda5bc5451aa...
It might be injected by an app. Maybe something called "CodeMirror"? (referenced from file)
Be careful with "unused CSS". Sometimes that's a false warning because Shopify is built on a templating system. So for example if there's a CSS file being loaded it might not be used on the page you're testing, but used on a different page. You can do conditional loading within your theme code to only show it on the page being loaded if that's the case.
Another case I see something like this is if you uninstall an app but don't remove the code from your theme (once you install an app, the app loses connection to your store so cannot uninstall itself fully if it had added code to your theme).
Most of the time you can find old app code by analyzing the loaded resources on your page and comparing vs apps loaded, then check theme.liquid to make sure there aren't any old app snippets, scripts, or stylesheets being loaded.
Hello @pranabjyotinath ,
Did you find why this file had been loaded?
I also have same issue with you. In the chrome console, the usage of this CSS file is 0.3%.
User | Count |
---|---|
558 | |
207 | |
121 | |
83 | |
44 |