By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,886 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Shadab wrote:
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
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.