Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
143 views
in Technique[技术] by (71.8m points)

javascript - How to view/delete local storage in Firefox?

In Google Chrome there is an easy way to see what's in local storage as well as modify or delete it after inspecting it.

Is there a way to do the same in Firefox?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can delete localStorage items one by one using Firebug (a useful web development extension) or Firefox's developer console.

Firebug Method

  1. Open Firebug (click on the tiny bug icon in the lower right)
  2. Go to the DOM tab
  3. Scroll down to and expand localStorage
  4. Right-click the item you wish to delete and press Delete Property

Developer Console Method

You can enter these commands into the console:

localStorage; // click arrow to view object's properties
localStorage.removeItem("foo"); 
localStorage.clear(); // remove all of localStorage's properties

Storage Inspector Method

Firefox now has a built in storage inspector, which you may need to manually enable. See rahilwazir's answer below.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...