1

So I'm trying to save just under 7000 characters locally in whichever browser hits my page. iPhone is my #1 priority.

It doesn't seem like the cookie gets created. I've found that localStorage doesn't work with iOS 7.0.4 (with the bundled safari browser) so I've had to find a workaround. What else than LocalStorage and cookies are there? Something that would actually work for the iPhone.

Nict
  • 3,066
  • 5
  • 26
  • 41
  • AFAIK safari supports WebSQL http://html5doctor.com/introducing-web-sql-databases/ – Oleg Jan 20 '14 at 13:27
  • Does `localStorage` work on iOS [if you turn off private browsing](https://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an)? – Andy Jan 20 '14 at 13:27
  • @Andy Nope, I've tried both with and without. – Nict Jan 20 '14 at 13:38

1 Answers1

0

See: https://stackoverflow.com/a/4695652/1001450 for a solution (PersistJS).

Community
  • 1
  • 1
Bob Brinks
  • 1,372
  • 1
  • 10
  • 19
  • It's still not creating my one cookie that has the 7000 characters. Is there an option I need in order for it to store the data in chunks? – Nict Jan 20 '14 at 14:25
  • I saw this awnser (http://stackoverflow.com/questions/4692245/html5-local-storage-fallback-solutions) by josh3736. That will probably work beter. It has more fallback methods. – Bob Brinks Jan 20 '14 at 14:45
  • PersistJS is giving me an error in the source. Line 829 of persist.js `Uncaught TypeError: Object # has no method 'init'` – Nict Jan 20 '14 at 20:03
  • Are you including it after including jQuery? – Bob Brinks Jan 21 '14 at 08:09
  • Yep, I figured it out though, just me being a dumbass and forgetting the `new` keyword. – Nict Jan 21 '14 at 08:15