Can I use a javascript function that converts string into byte?

S

Shadab

Problem: I want to store data from a form into a cookie but the cookie
size is limited to 5kb. Eventually if the saved data crosses the limit
5 it does not get saved anymore. Is there any possibility to reduce
the size of the string so that I can save some more datas in a cookie?

What javascript function on clientside can I use that converts the
string into byte? Or, Is there a possibility to increase the cookie
size & how?

Thanks in anticipation.
 
R

Richard A. Lowe

Well, I would question the requirement to save more than 5kb of data in a
cookie... almost any server-side scheme would be superiour to saving that
much data in a cookie, frankly. Perhaps you should describe your
requirements a bit more i.e. why you have to do this.

Richard
 
S

Shadab Lari

Thanks Richard for replying.

Well I am doing a project where the usual requirement is to fill data
online (real time). In the event of no internet connection I still want
to fill the data and save in a form of a cookie (I am currently not sure
in what other format I should save the offline data). Once I am
connected to the internet it should be possible for me to
upload/integrate the offline data (which I currently save in the form of
cookie) to the online version/database.

Now the problem is if I fill the offline form the data is saved in a
form of a cookie, which has the limitations as pointed out earlier.
Subsequently the data does not get saved if I fill the 2nd form, because
the size of the first cookie is more or less 4kb!

Any suggestions for this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top