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.
 
T

Thomas 'PointedEars' Lahn

Shadab said:
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?

Depends.

You could try apply a compression algorithm on the data
before storing it and decompress it after retrieval.

Could you show a short example of the data to be stored?
What javascript function on clientside can I use that converts the
string into byte?

Since there is no `byte' type in JavaScript (it uses floating-point
arithmetics only), there is no such function.
Or, Is there a possibility to increase the cookie size & how?

No, and if you think it through you will agree that it is a Good Thing
as it is.


PointedEars
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top