Invalid MIME type when using ArcGIS Online Basemaps in JavaScript API

751
1
01-11-2012 06:17 AM
JasonGreenlaw
Occasional Contributor
When using ArcGIS Online basemaps in the JavaScript API, for example:

new esri.layers.ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");


An invalid MIME type is returned from the arcgis online server.  Using Chrome Developer Tools, the following warning is returned for every tile request:

Resource interpreted as Image but transferred with MIME type image/jpg: "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/8/100/75".


I believe the proper MIME type for any sort of JPEG/JPG image should be "image/jpeg", not "image/jpg". 

Most browsers should be smart enough to interpret the image correctly, however it's quite annoying to see these warnings stack up in the JavaScript console.

Has anyone else experienced this issue?
0 Kudos
1 Reply
MikeOnzay
Occasional Contributor III
Yes, I see this message in Chrome all of the time. StackOverflow says that answer requires a server fix. Another user provides a way to hide the messages while you are developing.

http://stackoverflow.com/questions/1549967/chrome-warning-about-static-resource-css-gif-png-js
0 Kudos