Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6836371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:20:51+00:00 2026-05-26T23:20:51+00:00

In my content script I have done following : document.onreadystatechange = function(){ localStorage[options] =

  • 0

In my content script I have done following :

document.onreadystatechange = function(){
  localStorage["options"] = "yes";
}

If I try to access this localStorage[“options”] in my options.html page. it is giving me undefined error.

What can I do to access this content?

My Requirement : I need to get some data from the page source of a specific page and store it in localStorage. Then i need to process this data in my options.html page.

Edit : I am able to access the localStorage created in the options page in my background page.
But I can’t access localStorage created in content script in the options page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:20:51+00:00Added an answer on May 26, 2026 at 11:20 pm

    Unfortunately, that’s not a bug. You’ve hit a limitation in Chrome’s extension sandboxing. Background and options pages don’t share cookies, localStorage, or any other JS persistence that you would expect to work on the same “domain” (read: extension).

    The solution is to use messaging, as described in the docs:
    Message Passing

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the script I have written for gzipping content on my site, which
I have a PHP script that does the following: Uses file_get_contents() to get content
I have the following code in the front end <asp:Content ID=Content1 ContentPlaceHolderID=cphMain runat=server> <script
I have the following HTML containing a drop down list (single selection) <script type="text/javascript">
I'm currently writing out xml and have done the following: header (content-type: text/xml); header
I have the following code: <html xmlns=http://www.w3.org/1999/xhtml> <head runat=server> <title></title> <script src=http://code.jquery.com/jquery-1.4.4.min.js></script> <script type=text/javascript
A site done completely in HTML now needs to have some content added to
My goal for this project is to have this script perform the following: 1-
I have a contentEditable div with following text for example: <div contentEditable='true'> This document
I have a script which collects an image, link and some text content from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.