Support » Plugin: LiteSpeed Cache » Google Maps Load Time / Page Speed

  • Resolved simon_im

    (@simon_im)


    Everything thing else on the page loads in under 1 sec.

    Google Maps accounts for over half the page requests and adds over 1 sec to the page load time.

    Is there anything we can do with Litespeed Cache to lazy load (or similar) the map displayed via Google Maps API?

    Is there another solutions someone can recommend if Litespeed Cache can’t solve this specific thing (apart from making it an image)?

    Thanks.

    • This topic was modified 2 years, 7 months ago by simon_im.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Hai Zheng⚡

    (@hailite)

    What does the code look like? We do have lazy load for js.

    Plugin Support LiteSpeed Lisa

    (@lclarke)

    Hi, @simon_im

    Do you still need help with this? Is it using JavaScript? If so, you can defer it (have it load at the end) via LiteSpeed Cache > Settings > Optimize > Load JS Deferred.

    This will defer the loading of all JS on your site, though, so if there is some JS that you do not want to defer, you will need to use JS Excludes on the Tuning tab for that.

    If this doesn’t help, please tell us a little bit more about the Google Maps code, so we can better advise.

    Thanks for check back in on this.

    The issue is that google maps doesn’t start doing its thing until almost everything else on the page has loaded.

    So if it was possible to lazy load google maps it get to async, that might reduce the load time.

    I don’t know if LS Cache can solve this, was just curious if it could and if so how.

    Plugin Support LiteSpeed Lisa

    (@lclarke)

    So, then it sounds like Google Maps is already deferred. And you want it to load at the same time as everything else (or not load at all until the user scrolls to it).

    Understood.

    Well, we really do need to know what’s in the Google Maps code. If it’s JS, that can’t be lazy loaded. There may be a way to stop it from being deferred, but it depends on how it’s written and what your LiteSpeed settings are.

    Can you let us know a little bit more about the Google Maps code?

    Also, can you let us know what optimization settings you have enabled? (Or you can share your Environment Report: Navigate to LiteSpeed Cache > Report, press the Send to LiteSpeed button, make note of the “Report Number”, and post the number here so we can look it up.)

    The map uses this if that’s helpful?
    http://jetelements.zemez.io/advanced-map/

    Report DAFNJOTQ

    Plugin Support LiteSpeed Lisa

    (@lclarke)

    It looks like it’s a JavaScript map, in which case it can’t be lazy loaded. There’s really nothing LSCache can do with it. Sorry!

    Maybe the JetElements people have a suggestion for something to try on their end.

    I believe Google maps do lazy load but they do not all document load to complete until done. Result is a load time that is horrible. A solution is to load the map after the page completes loading. Problem with that is requires custom coding to implement. Kind of hairy.

    Louis

    (@schoemanlouis)

    I seriously need to increase my website speed. can anyone give me some pointers please – it’s a WordPress website.

    I know the pictures are a bit big – but any other help – I would be grateful.

    https://krugerbookings.com/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Google Maps Load Time / Page Speed’ is closed to new replies.