Performance problems when loading local JSON via <script> elements in IE8
Posted
by Jens Bannmann
on Stack Overflow
See other posts from Stack Overflow
or by Jens Bannmann
Published on 2010-06-15T08:11:49Z
Indexed on
2010/06/15
8:32 UTC
Read the original article
Hit count: 223
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?
© Stack Overflow or respective owner