Skip Navigation

[Resolved] How to remove Google map js files from pages which doesn't have any Google map

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 4 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1808423

I am trying to: remove unnecessary Google map js files

Link to a page where the issue can be seen:
staging.wesold.co.uk

I expected to see:
I have replaced google map with a image in order to reduce unnecessary page load.

Instead, I got:
Scripts are still loading

#1809911

Hi,

Thank you for contacting us and I'd be happy to assist.

I've performed some tests on my website and the Toolset Maps plugin only loads a CSS file ( /wp-content/plugins/toolset-maps/resources/css/toolset_maps_fixes.css ) on pages without the map.

Other than that no other scripts or calls to Google Maps API are made, in case no map is loaded on the page.

Looking into the code and resources loaded on your website's homepage, I see several scripts and calls to Google Maps API and it seems that the active theme or some third-party plugin may be responsible for that.

I'll recommend testing the page, with all plugins (other than Toolset ones) disabled and with a default theme like Twenty Twenty.

After that, you can start adding the disabled items back, one-by-one, to narrow down to the one responsible.

regards,
Waqar