Posted in ColdFusion | Posted on 02-29-2008 | 4,230 views
Pat asks:
What's the best way to get around the old problem of cookie blocking? How do we keep variables current through a session, for example a shopping basket, when the user is paranoid enough to set 'accept NO cookies' ?I'm well aware a disclaimer on the site saying 'you must have cookies enabled' would work. I'm also aware of #URLSessionFormat("xxxx")# but that creates a mess in the URL. Are there any other ways of getting around this ? If not, what's the best way to set up Application.cfc to the best advantage when using URLSessionFormat ?
I think the solution here is simple, and you already know it. If the user refuses to accept cookies, then you must maintain state via URL parameters. I'm not really sure I'd call URLSessionFormat ugly. It works, and the nice thing is that if a user does accept cookies then it knows to not add the additional items to links. The only bad thing about this feature is that you have to be extremely careful to use it everywhere, including both simple navigation links and form posts as well.
Are any of my readers supporting cookie-less visitors without using urlSessionFormat?


i do always check that the user is notified that he needs to enable cookies for this site every time his action fails because of it.
Because, quite frankly, it is. Session cookies are just as vital to modern web browsing as the Anchor tag.
Modern web browsers allow you to turn off cross-domain cookies if you are really that paranoid. Any more than that is just silly.
I offer to walk them through turning them back on when possible -- some people have sysadmins that have disabled them on a network level, or via a cookie-cutting proxy server. In those extreme cases, I have a form email that they can forward to their sysadmins which explains how out of date the concept of cookie blocking is.
Same for people that turn off JavaScript.
"You must be this tall to ride this ride."
When I was investigating this, I noticed that Amazon (probably the biggest on-line retailer) don't support a 'no cookie' situation, they simply warn users to enable cookies. If it's good enough for them . . .
Without the useful command URLSessionFormat, how do other languages get around this issue ?
"This page is not Valid XHTML 1.0 Strict!"
Why? The Function is placing "&" instead of "&". If you would really like to use it, you will need another Replace() around it - even uglier then before ;)
[Add Comment] [Subscribe to Comments]