Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
How do I clear chrome.storage.sync for testing my extension?

I am making a little logic game as a chrome extension, to add a high score I wanted to use chrome.storage.sync. I want to only create a variable if it doesn't exist (the first time someone is opening the extension). To test if what I wrote works I have to clear all data for myself, how could I do that? (the documentation speaks senior developer and I am not one of those so I don't understand)

https://developer.chrome.com/docs/extensions/reference/storage/

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

chrome.storage.local.clear()

thats will Removes all items from storage.

you can also remove some keys and not all items by,

chrome.storage.local.get((data) => {
  // here you get all data and you can decide which keys to delete, 
  // in this case im deleting all keys explicitly

  chrome.storage.local.remove(Object.keys(data), resolve)
})
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!