Open Street Map And Page Speed Google - Question | JoomShaper

Open Street Map And Page Speed Google

Svyatoslav

Svyatoslav

SP Page Builder 3 days ago

My website has an interactive Open Street Map. It is displayed via the PageBuilder SP module in the footer, on each page of the site. I configured, through the Responsive settings, that this block is not displayed for mobile devices. And it really disappears. But the map scripts are still loaded and the page loading speed has not increased. This problem occurs because I use the Joomla module (Module SP PB Pro)? There seem to be no such problems with the component itself. How do I properly configure the template so that the map scripts are not loaded when using the mobile version.

PS: caching is working on the server, and Joomla is caching, maybe they are interfering. Please advise how to properly configure the site for the fastest use.

PS2: There is also a suggestion to improve the map functionality, for mobile devices load the map via preview, for speed. Add the "preview image" field to the settings and check the "use preview for mobile devices" checkbox.

0
4 Answers
Svyatoslav
Svyatoslav
Accepted Answer
3 days ago #228486

I have enabled caching for this module, and this script always ends up in the page header

The bad and big scripts: src="/components/com_sppagebuilder/assets/js/leaflet.js

I wish it wasn't there. Either it loaded with the module or not.

0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 1 day ago #228627

Hi,

Thank you for your detailed explanation and suggestions. We apologize for the inconvenience.

I'd like to confirm that this behavior is expected. The Responsive settings in SP Page Builder work by applying CSS to hide elements on specific screen sizes. The content is visually hidden, but the HTML, JavaScript, and other assets associated with the addon or module are still loaded by the browser. This is how the responsive feature has been designed and has been working for a long time.

Changing this behavior would require a fundamental architectural change to how SP Page Builder renders content, which could introduce compatibility issues with existing websites. For this reason, we are unable to provide conditional server-side rendering based on device size through the built-in responsive settings.

If your goal is to prevent the map and its scripts from loading entirely on mobile devices, you may consider using a third-party Joomla extension that supports conditional module rendering, such as Advanced Module Manager. It allows modules to be rendered only when specific conditions are met, preventing unnecessary code from being loaded.

Regarding your suggestion about loading a preview image for maps on mobile devices, we appreciate the feedback. We'll forward it to our development team for consideration in future improvements.

Thank you for your patience and understanding.

0
Svyatoslav
Svyatoslav
Accepted Answer
1 day ago #228710

And thank you too. It would be good if in future releases the maximum amount of attention was paid to the SEO indicators of the component and modules, reducing the number of scripts and their weight. Thank you very much for the explanation.

0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 16 hours ago #228716

Hi,

Thank you for your valuable feedback and understanding.

We completely agree that performance optimization, reducing unnecessary script loading, and improving SEO-related metrics are important factors for modern websites. Our development team continuously works on enhancing SP Page Builder and our other products to improve performance, optimize asset delivery, and provide a better overall user experience.

We appreciate you taking the time to share your suggestions and insights. Feedback like yours helps us identify areas where we can further improve our products, and we will certainly keep these considerations in mind for future development.

Thank you again for your support and constructive feedback.

Kind regards

0