Skip to content

LocalStorage Restrictions

James Sutton edited this page Sep 8, 2016 · 1 revision

The Paho Javascript library requires that the Client Browser has LocalStorage Enabled.

This is because it uses LocalStorage to persist QoS 1 & 2 messages to ensure that if the connection is lost, the messages are retained to be either fully sent or received once the connection is re-established.

If you have disabled cookies on a page running the Paho Javascript client, or for the browser as a whole, this is very likely to also disable LocalStorage as well. This is because the HTML specification generally treats persisted storage and cookies as the same.

Treating persistent storage as cookies If users attempt to protect their privacy by clearing cookies without also clearing data stored in the local storage area, sites can defeat those attempts by using the two features as redundant backup for each other. User agents should present the interfaces for clearing these in a way that helps users to understand this possibility and enables them to delete data in all persistent storage features simultaneously. [COOKIES] https://html.spec.whatwg.org/multipage/webstorage.html

Clone this wiki locally