Hey All,
I am trying to increase the speed of my homepage. The homepage is very big, however the client does not want to remove any sections. That said, one issue is that there are a lot of duplicative modules that are re-saved as global modules.
For instance, there is a base module, Alt-Text-Img.module created. That same module is used 7 or 8 times, each time re-saved as a global module, rather than a saved section.
So, the homepage will have:
Alt-Text-Img.module (base module)
EDR_list.module (duplication of Alt-Text-Img.module and saved as a global module)
MDR_list.module (duplication of Alt-Text-Img.module and saved as a global module)
*This same concept repeatedIt's my understanding that because these are resaved as new global modules hubspot is reloading all the html, css and js within those modules.
Whereas, if the modules were just duplications of the same module hubspot would recognize the module's id and only load the code once.
I understand what the intention was—the content editor only wanted to create the section once—but wouldn't this method mean HubSpot is reloading all the code multiple times?
What is another way of using the same module multiple times on the same page, while being able to save the content for use on other pages?
When using multiple instances of a module on a page, will HubSpot only render module.css and module.js once, but will always re-render module.html no matter what?
*I just looked, and it appears they are out of saved sections.
"When a page includes multiple instances of the same module, HubSpot will only load module.css and module.js from that module once. By default, module.css and module.js do not load asynchronously, but you can change this by including css_render_options and js_render_options in the module’s meta.json."