Delete item from storage - Better Battlelog Forums #147559

Hello together,

quick question. How can I delete an item from the BBLog storage? The removeItem function which is JS providing is here not working, someone has a quick tip?

Also is says: "Please use this not as much because users browser storage is limited". Does it mean that I should not create like 100 vars in the storage or does it mean that the stored data shouldn't be to big? Because for a plugin I would like to save some server guids. Depending on how much server the user wants to store it's possible that there are a lot of guids in it.
Is there a number of data I shouldn't exceed?
Post edited 1 x times, last by
It simply depends on the size of the saved data, see "localStorage" limitations of Html5.
All plugins and bblog itself share one localStorage element, therefore the plugin should not save tons of data.

If you mean delete storage in a plugin, always use "", overwrite your value with "null", this means "deleted" in our case. Explicit delete does not exist. If you call the storage getter you also get null when the key doesn't exist.