javascript - block multiple instances of firefox app -


i have built firefox 22 application in javascript/html5 , block user opening multiple instances of (whether in separate tab or separate browser).

currently works extent when try open instance of it, redirects about:blank, brings original instance of application focus (switches tab or window), , displays alert (on original instance). done checking displaystate variable i've set in localstorage.

the problem i've run while alert up, user can open many instances of application he/she wants.

is there better way using (a displaystate check in) localstorage this? or there way keep alert timing-out application?

alert blocks script execution in firefox (this not e.g. opera), hardly can change this. therefore should use different.

nonetheless may set localstorage key on application startup , unset on shutdown (window.onunload). user can stuck, though, if browser crashes. may try sessionstorage, automatically cleaned when browser closed.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

c++ - End of file on pipe magic during open -