To manually add/edit an entry in the local storage of a mobile (Android) browser, follow these steps:
-
Open the browser and navigate to the website where you want to add/edit the data.
-
Inspect the Element: Right-click anywhere on the webpage and select "Inspect" or press
F12to open the Developer Tools. Switch to the "Elements" tab. -
Locate the key and value you want to store in the local storage:
- Keys are usually strings that identify the data, like
myKey. - Values are the data you want to store, like
myValue.
- Keys are usually strings that identify the data, like
-
Right-click the element containing the key and choose "Copy" > "Copy element".
-
Paste the copied HTML code into a text editor.
-
Modify the value if you want to edit an existing entry. To add a new entry, create a new key-value pair.
-
Replace the value in the copied HTML code with the new value or the modified value.
-
Copy the modified HTML code.
-
Go back to the Developer Tools, delete the existing key-value pair (if any), and paste the modified HTML code.
-
Press
Enterto save the changes.
Now, the local storage should contain the updated or new data.
References:
- Book: "JavaScript & jQuery: Interactive Front-End Web Development" by Jon Duckett
- Article: "Using the Web Storage API" by Mozilla Developer Network (MDN)
- Online Resource: "Local Storage" by W3Schools