> I am building an application where we do not want to
> require the user's
> browser to accept cookies.  Like most applications out
> there we use the
> session scope very heavily and want to continue to utilize
> it.

> I have read the CFMX WACK Ben Forta book about this task
> and it
> recommends passing one of these variables:
> 1. session.URLToken
> Or
> 2. client.URLToken

> (this ensures the CFID, CFTOKEN, or JSESSIONID are
> available.)

> Has anyone done this before?  What is the "best way" to
> accomplish this?

> The application is almost complete and I am not currently
> passing
> session.URLToken and am not sure what other people have
> done to
> accomplish this in an effective and easy to implement way.

I can't emphasise enough how utterly wrong it is to avoid using the
cfid and cftoken cookies.

That being said, if you require javascript  you should be able to use
something like this after the closing body tag and get away with it.
There are ways to make this valid xhtml, involving the window.onload
event, but I won't get into that:

<script language="JavaScript">
        function addToken(str) {
                if (str.toLowerCase().indexOf("?")<0) { str += "?"; }
                str += "#session.urltoken#";
        }

        for (x = 0; x < document.links.length; x = x + 1) {
                link = document.links[x];
                link.href = addToken(link.href);
        }

        for (x = 0; x < document.forms.length; x = x + 1) {
                form = document.forms[x];
                form.action = addToken(form.action);
        }
</script>

This probably doesn't make sense (requiring javascript) if you're
avoiding the cfid and cftoken cookies, but this is the only way to
accomplish this that ultimately won't make you want to tear all your
leg, arm, chest, back, head and eyebrow hair out.

hth

s. isaac dealey     954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://macromedia.breezecentral.com/p49777853/
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195829
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to