Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save large amount of data within users browser?

I have been writing a php script that saves a long string within cookie (more than 4000 chars long) and I want to save it within the browser cache. The problem is that almost all browsers have a limit. What should I do? I'm using jQuery for adding and reading data from cookie and php.

like image 466
JohnRoach Avatar asked Feb 27 '23 08:02

JohnRoach


2 Answers

Rethink your App logic and save most of the data on server.

This will save you a lot of hassle in the long run.

Just my two cents.

like image 122
Frankie Avatar answered Feb 28 '23 23:02

Frankie


You can use HTML5 based concept of IndexDb to save data at client end.

www.tipstr.in/html5-learn-use-indexeddb

like image 43
Jhanvi Avatar answered Feb 28 '23 22:02

Jhanvi