Hi Rune,

If you have dozens of Mb of datas, then LocalStorage is a dead end. It has been 
designed to be a local cookie (aka not available server-side, so not sent in 
every http request). So just to store a string or two (username, json string of 
params, ...), not megabytes of text.
IndexedDb is the (only) right way to go. It’s a totally crappy over-engineered 
noSql beast, but that’s the only option we have nowdays...
Longer answer here : https://softwareengineering.stackexchange.com/a/219964


The install prompt is a new spec only available on Google Chrome. It uses a web 
manifest json file to do it. Then all the rest that makes a “progressive 
webapp” (PWA) is a set of new html5 features like service workers, push api, ...
For Safari (iOS), standalone mode still exists, but you have to implement this 
“add to homescreen” prompt yourself.


Scramblers? Are you looking for a way to minimize your JS/CSS file size or to 
really encrypt them?


What about eval() ? It’s pretty unpopular those days but surely doing the job.
Or you can just call localStorage as an array.

function init_ldb(fname){
  return (fname!=“”)?localStorage[fname].toString():null;
}

But then, “fname” must match your localStorage object name (customers, 
products, jobs,...)


Remi

> Le 5 janv. 2018 à 16:15, Rune Back <rune.b...@gmail.com> a écrit :
> 
> - What if my app uses a lot of local data, let's say 10 or 10s of Mb. Any 
> suggestions of a database to use so that my app won't be slowed down?
> 
> - Everyone is used to pushing a button in order to download and install an 
> app. How do I make an hml5 app downloadable that way?
> 
> - How reliable are the scramble programs on the market? - My app conists of 
> around 250Kb JavaScript. Even though I myself get lost at times in the code, 
> I would like to scramble both the code and the data.
> 
> - Let's say I have this function:
> 
> function init_ldb(fName) {
>       if (fName=="job") theLdbData = localStorage.jobs
>        else if (storageName=="cust") theLdbData = localStorage.customers
>         else if (storageName=="prod") theLdbData = localStorage.products
>          else ....
> // ...
> }
> 
> Is there any way of simplying this kind of like this:
> 
> function init_ldb(fName) {
>       theLdbData = localStorage.fName
> // ...
> }
> 
> ​Appreciating any help.​
> -- 
> You received this message because you are subscribed to the Google Groups 
> "iPhoneWebDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to iphonewebdev+unsubscr...@googlegroups.com.
> To post to this group, send email to iphonewebdev@googlegroups.com.
> Visit this group at https://groups.google.com/group/iphonewebdev.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to iphonewebdev+unsubscr...@googlegroups.com.
To post to this group, send email to iphonewebdev@googlegroups.com.
Visit this group at https://groups.google.com/group/iphonewebdev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to