• Resolved laconicsky

    (@laconicsky)


    As soon as I set the Load JS Deferred setting to Delayed, the Google Maps API starts misbehaving.

    For example the map doesn’t load and the location search on my site (that is driven by the google maps api) doesn’t work.

    I’ve tried adding the following to Tuning and JS Deferred / Delayed Excludes in Litespeed settings:

    map

    maps

    and also the following as spotted in page speed insights all of which are maps.googleapis.com files:

    util.js

    controls.js

    common.js

    Nothing works though.

    Could you help please.

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter laconicsky

    (@laconicsky)

    gtm.js

    analytics.js

    the above are already in the exclude list (I can’t remember if I put these in ages ago or if they are a default setting).

    Basically, the filter works. However, the problem is that one has to find out which relevant .js files are affected. In the worst case you would have to disable the delayed option and use deferred instead, although you should basically work on reducing the amount of javascript. All relevant .js files are not reduced by the optimization settings. This only changes the loading behavior. In the end, the same amount of code always has to be loaded.

    Thread Starter laconicsky

    (@laconicsky)

    Thanks again for your help, I really appreciate you taking the time. I’ll go with deferred for now.

    Thread Starter laconicsky

    (@laconicsky)

    Could you remove the maps api key? Not sure if it’s an issue or not. Thank you.

    In order to be able to narrow down the problem or the cause, you would have to test deactivate the cache plugin and reset all optimization settings so that you have a starting point where Google Maps works. This would give you a better idea of which .js files are affected.

    Thread Starter laconicsky

    (@laconicsky)

    I meant remove the api key from your post above rather than me removing it from the lite speed settings. Thanks.

    Of course you are right, but with API key is nothing special. It is public and can be read from the source code of your site.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Google Maps doesn’t load with Load JS Delayed’ is closed to new replies.