Title: Defer (&#8220;lazy load&#8221;) map scripts
Last modified: December 15, 2022

---

# Defer (“lazy load”) map scripts

 *  Resolved [swinggraphics](https://wordpress.org/support/users/swinggraphics/)
 * (@swinggraphics)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/defer-lazy-load-map-scripts/)
 * In [this thread](https://wordpress.org/support/topic/defer-wp-google-maps-script-images/),
   it was said that deferred scripts were coming in 8.1. This is still very much
   needed. The plugin should not load any resources until the page has loaded, maybe
   even waiting until the map is in view or close to it. As such, it would be optimal
   to add the required JS tags to the page only after window load (regular images
   should be finished loading before fetching more from Google). Maybe even wait
   until the map is in view or close to it.

Viewing 1 replies (of 1 total)

 *  Plugin Author [DylanAuty](https://wordpress.org/support/users/dylanauty/)
 * (@dylanauty)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/defer-lazy-load-map-scripts/#post-16292793)
 * Hi [@swinggraphics](https://wordpress.org/support/users/swinggraphics/),
 * Thanks for reaching out, we appreciate your time.
 * That thread was in reference to the ‘defer’ attribute not being supported by 
   our code base, meaning that if you deferred the scripts the map would not initialize.
 * We did release support for deferred loading, meaning with a bit of additional
   set up you can defer the script loading without negatively effecting any of the
   map modules.
 * Usually, we recommend using a plugin like: Async JavaScript by Frank Goossens(
   futtta) – To manage the deferred loading of the modules, as it applies to all
   scripts within the environment while allowing granular control over what is applied.
 * With that being said, we do have plans to add settings for this and full lazy-
   loading within the plugin core at a later stage.

Viewing 1 replies (of 1 total)

The topic ‘Defer (“lazy load”) map scripts’ is closed to new replies.

 * ![](https://ps.w.org/wp-google-maps/assets/icon-256x256.png?rev=3058363)
 * [WP Go Maps - Google Maps, OpenStreetMap, Leaflet Map](https://wordpress.org/plugins/wp-google-maps/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-google-maps/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-google-maps/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-google-maps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-google-maps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-google-maps/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [DylanAuty](https://wordpress.org/support/users/dylanauty/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/defer-lazy-load-map-scripts/#post-16292793)
 * Status: resolved