homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

JavaScript Chips (cookie segments)
Functions compatible with ASPs cookies?

 3:39 pm on Jul 11, 2002 (gmt 0)

I've been mucking around trying to change some existing JS cookie functions to set and read cookie 'chips' in the same way that ASP does (through it's request.cookies and response.cookies) so the two are compatible - to avoid unnecessary round trips, I want to do some work with cookies on the client too.

I'm slowly going out of my mind trying to get it to work.




 9:00 pm on Jul 11, 2002 (gmt 0)

If your talking about the asp sub cookies within cookies, (or maybe that's whole cookies within cookie categories), I tried that sometime ago. I too went out of my mind, but from an unrelated cause I think 8-). I finally gave up and made them simple, flat, one dimensional cookies. THese shared accross asp and javascript just fine. You can still build somewhat of a hierarchy into the cookie names, so it worked OK for me.

Good luck


 10:21 am on Jul 12, 2002 (gmt 0)

Yeah, sub cookies look something like


Where the ChipValues are escaped (%20 etc) - does the whole cookie value need to be escaped also - meaning that the ChipValues are escaped twice? This could be the root of the problem as for JS to deal with that we'd need a 'unescape' function.

hmmm :(


 10:30 am on Jul 12, 2002 (gmt 0)

Yeah! There is an 'unescape()' function. I'm think that might fix it now that I think about it.... I can't try it until I get back to work on Monday...
I'll keep you posted.


 2:14 pm on Jul 12, 2002 (gmt 0)

You could also try encodeURI() : decodeURI() or encodeURIComponent() :decodeURIComponent() if you are targeting newer (ECMAScript v3/Javascript 1.5 JScript 5.5) browsers.

escape() : unescape() has been deprecated.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved