Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Disturbing news: as of 5.0.1, iOS destroys localStorage and localDb
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Wytze  
View profile  
 More options Mar 22 2012, 11:55 am
From: Wytze <wytzeschou...@gmail.com>
Date: Thu, 22 Mar 2012 08:55:38 -0700 (PDT)
Local: Thurs, Mar 22 2012 11:55 am
Subject: Disturbing news: as of 5.0.1, iOS destroys localStorage and localDb
I just got word that localStorage and localDb data are no longer
persistent in iOS as of version 5.0.1. The files have been moved to a
location in cache which is regularly cleaned.

I am still wrapping my head around what this means for my app and for
my use of persistenceJS. First thought is that there is no rescue,
since even saveToLocalStorage won't help now.

Anyone with a more optimistic perspective, or should I now switch to
indexedDb for good?

Link:
http://groups.google.com/group/phonegap/browse_thread/thread/4490b6a8...

Kind regards,

Wytze


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neville Franks  
View profile  
 More options Mar 22 2012, 3:21 pm
From: Neville Franks <s...@surfulater.com>
Date: Fri, 23 Mar 2012 06:21:41 +1100
Local: Thurs, Mar 22 2012 3:21 pm
Subject: Re: [persistence.js] Disturbing news: as of 5.0.1, iOS destroys localStorage and localDb
My understanding is Persistence.js uses the WebSQL Database which in
turn uses SQLite. I don't see how localStorage or localDb effects this.

Friday, March 23, 2012, 2:55:38 AM, you wrote:

W> I just got word that localStorage and localDb data are no longer
W> persistent in iOS as of version 5.0.1. The files have been moved to a
W> location in cache which is regularly cleaned.

W> I am still wrapping my head around what this means for my app and for
W> my use of persistenceJS. First thought is that there is no rescue,
W> since even saveToLocalStorage won't help now.

W> Anyone with a more optimistic perspective, or should I now switch to
W> indexedDb for good?

W> Link:
W> http://groups.google.com/group/phonegap/browse_thread/thread/4490b6a8...

W> Kind regards,

W> Wytze

--
Best regards,
  Neville Franks, Author of Surfulater - Your off-line Digital Reference Library
  Soft As It Gets Pty Ltd,  http://www.surfulater.com - Download your copy now.
  Victoria, Australia       Blog: http://blog.surfulater.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zef Hemel  
View profile  
 More options Mar 23 2012, 3:40 am
From: Zef Hemel <zefhe...@gmail.com>
Date: Fri, 23 Mar 2012 08:40:32 +0100
Local: Fri, Mar 23 2012 3:40 am
Subject: Re: [persistence.js] Disturbing news: as of 5.0.1, iOS destroys localStorage and localDb

If you read the linked post it also talks about WebSQL. Its data will still be persistent, but may be cleaned up whenever required. Effectively, on iOS, WebSQL is now a structured caching solution. Indeed disturbing. The only solution I see is sync. Sync your data to a server regularly and restore if necessary. If you don't store a lot of data you can use persistence.dump to create a large JSON object you could send to the sever and easily persistence.load again later.  

But yeah. This kind of sucks.  

-- Zef

Sent from my iPhone.

On Thursday 22 March 2012 at 20:21, Neville Franks wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sudhakar Fomra  
View profile  
 More options Mar 23 2012, 4:05 pm
From: Sudhakar Fomra <sfo...@gmail.com>
Date: Fri, 23 Mar 2012 13:05:41 -0700 (PDT)
Local: Fri, Mar 23 2012 4:05 pm
Subject: Re: [persistence.js] Disturbing news: as of 5.0.1, iOS destroys localStorage and localDb

The phonegap SQLitePlugin (https://github.com/davibe/Phonegap-SQLitePlugin)
stores the DB file in the app's persistence storage location....

This brings me to a question for Zef... How difficult/easy would it be to
modify persistence.js (for people who are already using it in their
projects) such that persistence.js uses this DB file insted of the file
stored in the cache (in iOS 5.1 and above)??? I'll be looking into it as
well... but Zef you would be the right person to tell this...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zef Hemel  
View profile  
 More options Mar 25 2012, 8:20 am
From: Zef Hemel <zefhe...@gmail.com>
Date: Sun, 25 Mar 2012 14:20:25 +0200
Local: Sun, Mar 25 2012 8:20 am
Subject: Re: [persistence.js] Disturbing news: as of 5.0.1, iOS destroys localStorage and localDb

It looks like the API is compatible with WebSQL, so I'd say it wouldn't be difficult at all. Just requires copying and adapting the WebSQL store a little bit.  

-- Zef

Sent from my iPhone.  

On Friday 23 March 2012 at 21:05, Sudhakar Fomra wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sudhakar Fomra  
View profile  
 More options Mar 25 2012, 8:29 am
From: Sudhakar Fomra <sfo...@gmail.com>
Date: Sun, 25 Mar 2012 05:29:03 -0700 (PDT)
Local: Sun, Mar 25 2012 8:29 am
Subject: Re: [persistence.js] Disturbing news: as of 5.0.1, iOS destroys localStorage and localDb

True dat, did some digging and supposedly the only difference in the websql
and phonegap sqlite plugin apis is this

in WebSQL : result.rows.item(0)
in the phonegap plugin : res.rows[0]

and there is a bridge for this as well...

https://gist.github.com/2009518

Call this tx.execteSql, and only other change that then needs to be made is to use the plugin to instantiate/create the DB.

-SF.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »