“not well-formed” warning when loading client-side JSON in Firefox via jQuery.ajax

前端 未结 2 410
情深已故
情深已故 2020-12-03 11:14

I am using jQuery\'s ajax method to acquire a static JSON file. The data is loaded from the local file system, hence there is no server, so I can\'t change the MIME type.

2条回答
  •  温柔的废话
    2020-12-03 12:10

    Local files and scripting don't mix. Way too much browser security stuff and other weirdness involved. If you want to test things, you should run your stuff through a HTTP server. Installing one locally might be a good idea.

提交回复
热议问题