In Settings/Safari, there is a Databases entry that allows me to view databases that have been created on my iPad (not their contents, but their size and origin).
However, I don't see any way to see what's in localStorage. I'm using the console to access localStorage in Safari (Develop > Show Web Inspector and clicking on the Storage tab).
Is there a way to view localStorage on the iPad that I'm missing?
Thanks
Local storage is the space available directly on a device, like your iPad. You don't need an internet connection to access files saved locally, but you must have your device with you if you want to access the files. The Files app on your iPad is an example of local storage.
In Safari, you can find Local Storage by first going to the Develop menu, then choosing Show Web Inspector, selecting the Storage tab and then selecting Local Storage from the side menu.
To get items from localStorage, use the getItem() method. getItem() allows you to access the data stored in the browser's localStorage object.
Go to Settings > General > [Device] Storage. You may see a list of recommendations for optimising your device's storage, followed by a list of installed apps and the amount of storage each one uses. Tap an app's name for more information about its storage.
If you have access to an Apple computer, you can use Safari's Web Inspector to inspect stuff on your iPad - including localStorage and sessionStorage.
In your iPad, go to Settings
> Safari
> Advanced
and turn on Allow Remote Debugging
.
Then, plug it into your Apple computer.
In Safari, go to your settings and choose Advanced
. Check the box that says Show Develop menu in the menu bar
.
Now, if you click on develop
on the top menu bar, you will be able to see your iPad. You will be able to inspect elements and use it much like Webkit's Web Inspector.
Currently, though, it is not using the standard Webkit inspector - and many people have an issue with this.
You can access localStorage with javascript commands. (See https://developer.mozilla.org/en/dom/storage#localStorage for reference.)
To debug remotely, try using http://jsconsole.com/.
Also, you can enable viewing of console.log() output under iPad Settings -> Safari, which might help you debug locally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With