“google is not defined” when using Google Maps V3 in Firefox remotely

前端 未结 14 2179
太阳男子
太阳男子 2020-12-01 10:28

Here\'s my conundrum: I have a page that uses Google Maps V3 and jQuery. It all worked well locally in FF5, Chrome and Safari.

Once I uploaded to a web site, I get

14条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 10:52

    From Firefox 23, there is Mixed Content Blocking Enabled set by default (locally disabled). It blocks some APIs from Google also if you use secure connection and some unsecure APIs.

    To disable it you'll have to click shield which appears in location bar when there are some unsecure contents, set 'Disable protection' and then you'll have to look at yellow exclamation mark in location bar :(

    https://blog.mozilla.org/.../mixed-content-blocking-enabled-in-firefox-23/

    You can always try also replace http protocol with https in the API url. If API is provided also in secure connection - you will not see any warnings.

    It works for me.

提交回复
热议问题