0

I need a Common storage for Chrome website and Chrome Extension. I have a Website. i stored Auth key in local storage. and also i developed chrome extension when i open the extension i want to access the local storage key as i already stored. Please let me know is this possible otherwise suggest some alternatives

I stored key in web like

localStorage.setItem("key", "XXXXX");

I want to access this key in chrome extension popup.js

Kindly Help me.

Arunkumar
  • 5,150
  • 4
  • 28
  • 40
  • Did you try searching for [localStorage in the google-chrome-extension tag](http://stackoverflow.com/search?q=%5Bgoogle-chrome-extension%5D+localStorage)? Please explain how the information contained in the top results does not solve your problem so we can provide answers which are more targeted to your problem. – Makyen Oct 21 '16 at 07:49

1 Answers1

0

You can access localStorage (localStorage.getItem('key')) only from content script, but you can exchange data between content script and background/event scripts through chrome messaging if you need.

Sojtin
  • 2,714
  • 2
  • 18
  • 32