Warning: Google Maps JavaScript API loaded without loading=async

Created on 15 July 2024, 5 months ago
Updated 12 August 2024, 4 months ago

Problem/Motivation

Using a Google Maps map I get the following warning:

Google Maps JavaScript API has been loaded directly without loading=async. This can result in suboptimal performance. For best-practice loading patterns please see https://goo.gle/js-api-loading

The module is using defer="defer" async="async" in the script tag to load the library, and it looks this is not good enough. Besides, I think we shouldn't be using both defer and async, it should be one or the other, in any case.

Steps to reproduce

Place a map from a Geolocation field.

Proposed resolution

Adjust the implementation to one of the approached suggested in https://goo.gle/js-api-loading.

📌 Task
Status

Closed: won't fix

Version

3.0

Component

Javascript General / Frontend

Created by

🇪🇸Spain juanolalla

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024