I\'m trying to create a website that can be downloaded and run locally by launching its index file.
All the files are local, no resources are used online.
Wh
The way I just worked around this is not to use XMLHTTPRequest at all, but include the data needed in a separate javascript file instead. (In my case I needed a binary SQLite blob to use with https://github.com/kripken/sql.js/)
I created a file called and then included the data in the html like normal javascript: I imagine it would be trivial to modify this to read JSON, maybe even XML; I'll leave that as an exercise for the reader ;)base64_data.js
(and used btoa()
to convert the data that I needed and insert it into a var base64_data = "U1FMaXRlIGZvcm1hdCAzAAQA ...