Performance problems when loading local JSON via <script> elements in IE8
- by Jens Bannmann
I have a web page with some JS scripts that needs to work locally, e.g. from hard disk or a CD-ROM. The scripts load JSON data from files by inserting <script> tags. This worked fine in IE6, but now in IE8 it takes an enormous amount of time: it went from "instantly" to 3-10 seconds. The main data file is 45KB large.
How can I solve this? I would switch from <script> tags to another method of loading JSON (ideally involving the new native JSON parser), but it seems locally loaded content cannot access the XMLHttpRequest object. Any ideas?