• Resolved corysayles3d

    (@corysayles3d)


    When I check the box to optimize JavaScript, the google map on my contact page disappears. I have tried all of the exclusions that I can find on the forum, but nothing seems to resolve the issue.

    I am receiving an two Uncaught ReferenceErrors: jQuery is not defined

    Turning optimize JavaScript back off fixes the issue immediately.

    Any help would be greatly appreciated =]

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Uncaught ReferenceErrors: jQuery is not defined

    that means you have to make sure js/jquery/jquery.js is added to AO’s comma-separated JS optimization exclusions @corysales3d. if the problem persists, check the console for what should be other errors and report back.

    frank

    Hello, i have the same problem. But if I add js/jquery/jquery.js to the exclusions list, then Google PageSpeed test says js/jquery/jquery.js has to be optimized. What should i do?

    EDIT: I added this maps.google.com/maps/api/js instead of js/jquery/jquery.js and it worked.

    • This reply was modified 7 years, 2 months ago by walpap.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    not sure I understand, but if it works it works, good job @walpap ??

    Hello again! It didn′t work finally. ??

    My problem is that, when using autoptimize with default options Google PageSpeed, Gtmetrix and Pingdom say i should defer parsing of js/jquery/jquery.js.

    If i remove js/jquery/jquery.js from the exclusions list seems to solve the problem BUT then the google map from my contact page disappears.

    Also, if i left js/jquery/jquery.js in the list, my site loads slower and i got worst ranking. ??

    What should i do?

    • This reply was modified 7 years, 2 months ago by walpap.
    • This reply was modified 7 years, 2 months ago by walpap.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    My problem is that, when using autoptimize with default options Google PageSpeed, Gtmetrix and Pingdom say i should defer parsing of js/jquery/jquery.js.

    well, that means that your google maps plugins requires jQuery to be available early. in that you have to choose between having a working website and having a site that has a great (artificial) GPSI score.

    but when doing optimizations for customers and when encountering a google map, my advice is almost always to replace the google maps integration with an image of the map and to link that image to google maps. this can improve performance significantly ??

    now to be clear; a performance grade does not impact your ranking, only real performance (load time as measured in seconds) has a (slight) impact on your place in the Googles.

    hope this clarifies,
    frank

    Thank you Frank!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Optimize JavaScript Breaks Google Maps’ is closed to new replies.