CMS Development

kyle4
Participant

Eliminate render blocking resources -- legacy modules

Hello,

 

I am having trouble locating and deleting static legacy modules. Using Google page speed tests I realized I have some render-blocking resources.Screen Shot 2020-09-28 at 11.40.04 AM.png

Then using the google developers coverage tool I found that on none of my pages does either legacyGalleryModule.css or legacyImageModule.css run. Because of this, I would like to delete them in order to increase our page speed insights score. However, I can not find the files so I can not delete them. Does anyone have insight into this? This is one of the files I am talking about. 

 

https://www.bioprocessh2o.com/hs/hsstatic/legacy-module-support/static-1.27/bundles/legacyGalleryMod...

0 Upvotes
2 Replies 2
BarryGrennan
Top Contributor

Eliminate render blocking resources -- legacy modules

I've taken another look at your site, run a test in my own developer environment and determined that it's hubspots default gallery module that's loading the css in question.

 

Again, note that it's only loading on your homepage, you can confirm this using "view page source" in chrome.

 

You can also clone the homepage, remove the gallery modules and view the page source of the clone in chrome to confirm that it removes the stylesheet.

 

I think the best solution would be to either remove those sliders on the homepage or replace them with a custom module that doesn't load that stylesheet.

 

To my knowledge, the specified stylesheet is not required for the sort of slider you have set up. So you could build a custom module that uses the same underlying "slick slider" stylesheet and javascript without needing to load legacyGalleryModule.css

0 Upvotes
BarryGrennan
Top Contributor

Eliminate render blocking resources -- legacy modules

Hi Kyle, 

 

I took a quick look at your site and noticed that the css file in question isn't being loaded on all pages. It seems to only be on the homepage.

 

This indicates that it's not at domain level (otherwise it'd be on all pages).

 

The remaining posibilities would be that it's loaded:

- At Page Level

- At Template Level

- In a Module on The Homepage

 

If you haven't alreadyinvestigated these avenues, take a look at these sections:

Removing A Stylesheet At Page Level

Removing A Stylesheet At Template Level

 

If neither of those resolve it take a look at the modules being used in the page. If there's custom modules in there, go into the Design Manager and look for linked stylesheets in the modules.

 

An alterante way of troubleshooting which module is causing the styelsheet to load (again, once you've eliminated both page and template level as culprits) would be to clone the homepage and remove the modules on the clone one by one and check the source code of the site in Chrome to see when the specified stylesheet ("<link rel="stylesheet" href="/hs/hsstatic/legacy-module-support/static-1.27/bundles/legacyGalleryModule.css">") disappears.

 

Hope that's of some help, let me know how you get on!

0 Upvotes