Skip to content

QoS 0 still accesses localStorage #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
benswinburne opened this issue May 15, 2019 · 0 comments
Open

QoS 0 still accesses localStorage #196

benswinburne opened this issue May 15, 2019 · 0 comments

Comments

@benswinburne
Copy link

This comment suggests that using QoS 0 would prevent the use of localStorage.

if the network connection or browser fails. If you do not wish for the Local Storage to be used, please do not use this client, or only use QoS 0 to send and receive messages.

However, when using QoS 0 I still receive an exception about access to localStorage being denied in Chrome; it works in Firefox.

Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

I am loading my code into an iframe on another webpage on a separate domain which perhaps has something to do with it. That said however, it'd be useful if using QoS 0 actually prevented the use of localStorage as it's not necessary. Looking at the code here, that's not the case.

It seems that this PR #191 would indirectly fix my issue as the Exception would no longer crash my application, but doesn't address the fact that QoS 0 doesn't disable localStorage usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant