I'm making a bookmarklet, and the bookmarklet goes to about:blank
, then stores data under localStorage
(technically, it downloads a script that stores data under localStorage
)
The idea is that it downloads a script, and stores it under localStorage
. That way, it doesn't have to download it again. However, there is no way of ensuring that one of the scripts won't try to edit the contents of another script (in localStorage
).
So, I was wondering if it was possible to get a fresh context for localStorage
, e.g. via going to about:blank/xyz
. However, I do not want this to go to a website, even if the website is specially designed for this. I want this to be entirely local (the entire purpose behind this is to save bandwidth).
Or, being able to somehow sandbox localStorage
would work too (in fact, that would be much preferred)
Any thoughts?
TL;DR I want to be able to have a fresh context for localStorage
, without accessing a website (e.g. via about:blank
, hence the title: Multiple about:blank's)