cookie or localStorage with chrome extensions
cookies, google-chrome, local-storage
Solution
Please see this:
http://code.google.com/chrome/extensions/content_scripts.html#host-page-communication
Content scripts are run in a separate JavaScript world, which means the content script's `localStorage` is different from the website's `localStorage`. The only thing the two share is the DOM, so you'll need to use DOM nodes/events to communicate.
Problem
I've read all the other q's here regarding the topic but couldn't solve my problem. I'm setting on my website the email of the user in the localStorage and i want to retrieve it in the extension. ``` localStorage.setItem("user", "andrei.br92@gmail.com" ); ``` But when i try to receive it with the chrome extension it fails to do so ``` value = localStorage.getItem("user"); ``` Which way is easier ? cookies localstorage ? im not pretentious