/    Sign up×
Community /Pin to ProfileBookmark

Saving very long cookies

Hi,

I’m writing an off line javascript application of a checklist application. A checklist is list of actions that the user have to perform and verify that he had completed every line on that list. So I display a cursor on that page and change the class of the lines the user had checked so he can know which lines he had completed and which he still have to complete.

Now here is the tricky part. I need to save that state so when the user close his IE and then reopen it he will still have the lines he had completed marked for him and the cursor displayed in its right location.

I have tried to save it in a cookie but it’s too long for that (up to 5000 chars of text in some cases even more).

I have tried to save two cookies each of a max length of 3000 chars, but that did not work either.

I can use the file system activeX object but then the user will get confusing messages about security when he loads the page or change to a diferent security setting for that page and for normal Internet.

Is there a way to save looooong cookies ?

Is there another way to save long strings in javascript ?

Any ideas on who to save a long string between diferent sessions of IE ?

Thanks

Erez

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@so_is_thisDec 16.2006 — The limit is 20 cookies per domain and the total for all cookies in the same domain is limited to 4K. The reason has to do with the size of the request header which must be sent to the server (since all associated cookies are also sent to the server with each request).

There really is no other place for JavaScript to directly save information. Your only other two choices are Ajax or ActiveX -- unless you wish to employ a custom control in your page which will do the same thing as Ajax will do for you. Of course, you said this was off-line. So, that leaves ActiveX. I think you can use HTML Applications (.hta) in order to avoid the "confusing" security messages.
Copy linkTweet thisAlerts:
@TNODec 16.2006 — depending on the client's security, you may be able to save the data straight to the clipBoard
Copy linkTweet thisAlerts:
@ehboymauthorDec 17.2006 — Hey, Writing to the clipboard works like a charm :-)

Thanks !
×

Success!

Help @ehboym spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...