Question

For my company I've created a RSS reader extension for our internal blog. The reason why I've build my own is irrelevant, I know there are many existings extensions. Suffice to say that the blog is completely sealed of from the outside. And let's not forget that it's simply fun to try new things like this :)

The extensions works almost perfectly. It shows a nice popup with the latest 10 posts and it shows a counter if new posts have been added to the blog.

However, since most of my collegaes are webdevelopers like myself, some of them use firefox ( the extension is being ported by an automated script for use in FF ) and have the "clear history on browser close" option enabled. This does however delete the localstorage as well. I know that this setting is the issue and not the porting because my collegae that do not have the option selected don't experience any of these problems.

I use localStorage to remember which posts have been read and which haven't. So for these people the result is that every browser restart the extensions says there are 10 new items regardless of any items they may or may not have read.

I've thought of a way to work around this issue by using a MySQL database through php and ajax. But I'd still need to reliably be able to store a userId or something to personalize the read/unread list.

There must be an easier and better way. I know many extensions with similar functionality that do not have this issue but I've got no idea how and can't find anything about it.

Do any of you have an idea ?

Thanks!

Was it helpful?

Solution

I just tried my own Chrome extension using chrome.storage.sync API. The storage won't be deleted if you clear all the history and local cache.

OTHER TIPS

I've only built Chrome extensions, not FF ones, but if you have access to the file system, you can store the data in a simple text file. To be honest, I'd blame the developers for clearing their history. ;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top