I did some research and I couldn't find a post that was specific to the Google Maps V3 Javascript API, so I'm posting a new question. Please let me know if there is a more appropriate place for this question.
My Issue:
Without touching anything, my website, utilizing the Google Maps V3 Javascript API, started giving me this error:
Resource interpreted as Script but transferred with MIME type image/png
Refused to execute script from 'http://mt1.googleapis.com/vt?pb=!1m4!1m3!1i15!2i9148!3i11958!1m4!1m3!1i15!2…2m1!1e47!12m3!1e37!2m1!1ssmartmaps!4e3&callback=_xdc_._63mj9u&token=110320' because its MIME type ('image/png') is not executable, and strict MIME type checking is enabled.
I started getting this in Chrome's javascript console completely out of the blue. Could this be related to too many requests to Google Maps? I was doing some tinkering on the map page and refreshing somewhat frequently, but never touched any of the working script dealing with how the map or its tiles are rendered - so I'm very confused.
Has anyone run into this issue and/or know of a solution?
UPDATE As implied in a comment below, this is not an 'ignorable' issue as it is affecting how the map tiles are rendered. Others are beginning to experience this kind of issue as well, as noted in this post. It is also an issue that is affecting other maps I've initiated on other websites (example).
I'm had open a issue in google maps and i got the answer:
There is a problem with the address of this api using htttp protocol. Replace with https that will work.
ex: 'https://maps.googleapis.com/maps/api/js?v=3'
Basically you may assume that it's a bug that has to be fixed in the API, not on clientside.
What you can try and should do:
In production you should always load the release-version of the API.
Currently you try to load the API-version 3.9.2 which isn't available anymore.
Instead the experimental version has been loaded.
Currently the documentation says that 3.17 is experimental and 3.16 is the release-version, but I think this isn't correct(not updated yet).
run inside the console:
alert(window.google.maps.version)
...and you'll see what has been loaded
As it seems there has been an update, 3.17 is release and 3.18 experimental(I guess the new 3.18 is the source of the issue)
For more info about controlling the version and getting the last stable release see: https://developers.google.com/maps/documentation/javascript/versions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With