What are iPhone Safari Databases?
Recently, I was poking around under my Safari Settings (Settings –> Safari) on my iPhone and came across an entry for databases. What are these?
iPhone Safari supports HTML 5’s client-side storage structure just as your desktop version of Safari (Safari –> Preferences –> Security –> Show Databases). It is useful for developing off-line capabilities for web-apps. They happen when you go to a website that has implemented the technology.
The idea is if you can store some information on your iPhone that you normally retrieve when visiting a website, your experience can be better/quicker.
Here is an example quoted from the W3:
…designed for scenarios where the user is carrying out a single transaction, but could be carrying out multiple transactions in different windows at the same time.
Cookies don’t really handle this case well. For example, a user could be buying plane tickets in two different windows, using the same site. If the site used cookies to keep track of which ticket the user was buying, then as the user clicked from page to page in both windows, the ticket currently being purchased would “leak” from one window to the other, potentially causing the user to buy two tickets for the same flight without really noticing.
To address this, this specification introduces the sessionStorage DOM attribute. Sites can add data to the session storage, and it will be accessible to any page from the same site opened in that window.
For example, a page could have a checkbox that the user ticks to indicate that he wants insurance… A later page could then check, from script, whether the user had checked the checkbox or not.
If the user had multiple windows opened on the site, each one would have its own individual copy of the session storage object.
The second storage mechanism is designed for storage that spans multiple windows, and lasts beyond the current session. In particular, Web applications may wish to store megabytes of user data, such as entire user-authored documents or a user’s mailbox, on the client side for performance reasons.
Again, cookies do not handle this case well, because they are transmitted with every request.
If you want all the really gory technical stuff, you can read about it here.
While all major browsers (except for Microsoft Internet Explorer) seem to support much of what HTML5 has to offer currently — the World Wide Web Consortium (W3.org) has not reached a recommendation on using it yet. It is expected to be recommended by late 2010. I imagine at that point you will see a lot more usage of the databases. However, since the iPhone only has one browser to contend with, it is easy for iPhone developers to make the decision to take advantage of those databases. Complete implentation of HTML5 for the Word Wide Web won’t happen for years though – so don’t hold your breath while you wait.
I have been getting tons of email asking various questions about the security of Safari Databases. You can see some of the questions in the comments. Everyone seems to be paranoid about them and are scared they are some rogue attempt to send information to 3rd parties. This is not the case. It’s just a way for information you have already supplied to a website to be stored on your iPhone so if you ever go back to that website it will be available and improve your user experience. Feel free to delete them with abandon if they make you nervous. But, they shouldn’t. I encourage you to read through some of the documentation here if you are still nervous. Once you understand, you won’t be.
I just recently noticed the Databases tab in my settings and went through it. I deleted everything, but there was an email address on there of someone I let use my phone once and an anonymous twitter as well. My question – is it possible that any info on my phone,including my email,would be sent to the email I found/person who used my phone? If no, would it make a difference if their phone was jailbroken?
The purpose of the database is to make it easier for YOU to access a website a second time. The data is on your phone. Not the website they visited. Sounds like your friend went to a website, entered their email address and the website basically asked your phone if it wanted to store that information on your phone so it would be easier to access the site next time. If the website was sent any information it was information your friend gave it (like the email address).
That being said, anything is possible. If your friend knows how to break into the iOS and write programming to specifically pass your phone information to miscellaneous websites then I guess the answer is ‘yes’. But, I would find it highly unlikely.
Hi! I was wondering what I found on my Iphone Safari database section. I found what was named “anonymous feed” from twitter, and I do not use Twitter. Have I been hacked? I deleted it as soon as I found it.
I doubt you’ve been hacked. My guess is that “anonymous feed” happens when there is some Twitter issue where it doesn’t show the feed properly. Still , deleting it won’t hurt anything. (:
Is there any way to prevent safari from accepting these databases?
Safari isn’t “accepting” anything. Safari creates the database for your convenience on your device. Think of it as browser cache. When you go to a website, your browser stores images and other info from that website in your browser cache, so the next time you go to that same page, it loads faster. This is the same concept. It is the nature of using a browser. Creating databases is just a way for the browser to grab a little extra information to make your experience more seamless.
There is no easy way to change the functionality of your iPhone/iPad Safari browser. I suppose you could hack the application and disable it if you had the knowledge to do so.
FYI re multiple gmail databases in iphone Settings/Safari/Databases:
Today I decided to delete just ONE of the iphone Safari databases for ONE new gmail addy that I knew had NO content in it yet in my iphone Mail app.
(For 2 years I have wanted to delete all those gmail databases in Settings/Safari/Databases but was chicken that it might delete something in my gmails in my iphone Mail app).
GREAT NEWS, all Gmail databases are now deleted from iphone Safari databases & no harm done whatsoever as all addys are just fine in the Mail app! (That news may have been obvious to tech geeks all along, but I wasn’t 100% sure so hesitated all this time!)
For other dummies like me, here’s the deal, like the above article basically says (which is what gave me the courage to start deleting):
Gmail addy databases end up in your iphone Safari Databases whenever:
1. You go to google website & create a new gmail; &/or…
2. You visit your gmail anytime thereafter via the WEB/Safari (vs. just using the iphone Mail app).
So have no fear, feel free to delete delete delete all those annoying gmail databases under Settings/Safari/Databases! It will NOT affect those same gmail addys in your iphone Mail app!
Can we take backup of Safari cache, that store in form of SQlite Database.
I don’t have much knowledge in this arena. You might check out File Juicer or iPhone Backup Extractor and see if it will do what you want.
Can we take Backup of Safari Database
Nasir – could you rephrase your question? I’m not quite understanding. (:
I noticed that “databases” is no longer under Safari settings. Any reason for this, was it removed in the latest version?
It’s still there. Could be you just haven’t gone to any sites that utilize them.
if i delete the email addresses under settingsdatabases will they return again if the email account is accessed from my iphone?
You can certainly delete them. They only make a difference when you are visiting the website that created the database. So, if you visit the website again, they will appear again.
I notice when I login to a yahoo email account or do a search on the yahoo browser they both create databases, whereas logging into a hotmail account or searching on google do not create datebases. Does anyone know why that is?
i recently loaned my iphone to a friend and happened to notice there were 3 new email accounts listed within my settings under “databases”. How would these appear all of a sudden?
They happen when you go to a website that has implemented the technology.
Can I prevent my e-mail accts from showing in my Safari database every time I sign in to them??
These databases only store what you’ve given them for a particular website. And, are only read if you go back to that same website. However, you could make a habit of deleting the databases after you visit a site that activates a database.
How do you delete the database after you visit that site that activates the database?
I can’t test this – but I suspect if you clear your history, cookies, and cache that would do it.
Are there any other websites that u can add to databases?
Braylon – I’m not sure I understand your question. Lots of websites have databases behind the scenes that populate the site. And, any website could have a database added to it if adding functionality to that site that warranted it.
Does databases send history alertes to listed email accounts
Not that I am aware of. You would have to set that up on your end (if it was available) as a client side action. In theory, I would assume the capability is there. But, I doubt anyone has done that yet.
Accidently, I no longer have the “Database” under Security of Safari Settings. Any idea how to become it avaialbe / visuable again?
I believe it only shows up when you’ve visited a website that utilizes them and thereby has information to display. (:
Usually just mobile of these
When I delete a database from my iPhone preferences, it appears again in settings > safari. This is true even if my safari has just one blank browser window open and have deleted cookies, cache, and history.
If I delete it twice, it does not return until I revisit the offending webpage. Thanks.