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 8713147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:16:18+00:00 2026-06-13T05:16:18+00:00

In my background.js, when I use localStorage nothing happens. I think it’s how chrome

  • 0

In my background.js, when I use localStorage nothing happens. I think it’s how chrome extension programming works (localStorage doesn’t work in background pages). I can use localStorage in popup page but for what I want to achieve, accessing localStorage in the background page is a must.

So I have two alternatives:

1- Send a request from background to popup page, popup page receive the message and create a localstorage with it, and background page retrieves the value of localstorage from popup page. When the background page sends the request, the popup page must respond instantly (not to except for a click of the user on extension icon).
If it’s possible, how to do it?

2- Find a way to store data in background page like localstorage. If it’s possible, how to do it?

Thanks

  • 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-06-13T05:16:19+00:00Added an answer on June 13, 2026 at 5:16 am

    You can use localStorage in background pages, the issue may be that background pages are persistent/stored in memory. So, you have to manually reload the extension, not just edit the file.

    To manually reload an extension:

    Hit: Chrome > Tools > Extensions (“Chrome” is either a wrench or three bars in a stack)
    Scroll to the one your working on, hit reload.

    Your other option is to install an extension to make this easier instead of having to got to the extensions page every single time. There are a few, such as Quick Extension Reload.

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

Sidebar

Related Questions

A little background: I use PowerShell on windows xp at work and I set
If I use @import icon/*.png; @include all-icon-sprites; I can use background-position: sprite-position($icon, foobar); to
Background: We use github for our project and I work on my own fork
Background I use JScript (Microsoft's ECMAScript implementation) for a lot of Windows system administration
Background: I use rails g scaffold hotel name stars:integer to start fast (and insert
Is it possible/recommended to use background worker threads with the web browser control? I
I've been following a tutorial that explains how to use background for a button
I have to design a form with an input inside it. I use background
background: trying to use the twitter gem for ruby-on-rails. in routes: map.resources :twitter_sessions map.finalize_twitter_sessions
Background: sometimes I use ps aux | grep process_name to figure out some statistics

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.