 |
Breaking
eBusiness and Search News |
|
 |
Dealing W/ Cookie-less Sessions
Axel asked a question about Vista Gadgets that I thought I would discuss here.
Sessions with MS Vista. I'm building a VISTA gadget calling an external CFM page using flash forms. It looks really cool, in particular in a flyout window.
Now when I need to log into the app, I realized that the VISTA Gadget space seem not to have any session handler. Any idea? The first thing you need to do is uninstall Vista. (No, I jest.) So with knowing nothing about Vista Gadgets (frankly widgets and gadgets bore me) I'd have to assume that they are acting like a cookie-less browser.
ColdFusion sessions require cookies in order to track your browser and associate it with a session... normally.
If your browser doesn't support cookies, you have two ways you can handle it.
All sessions come with a few default variables.
One of them is URLToken. This is a string of the form cfid=XXX&cftoken=XXX (or cfid=xxx&cftoken=xxx&jsessionid=xxx). As you can see, it is in a format appropriate for query strings.
This allows you to append it to the end of a link:
<a href="dharma.cfm?#session.urlformat#">Secret Dharma File</a>
Another option is urlSessionFormat().
You can wrap your links with this function and ColdFusion will determine if it needs to add the session information or not. Here is an example of that:
<a href="#urlSessionFormat('dharma.cfm?')#">Secret Dharma Files</a>
The important thing to note though is that all links have to use one of these methods.
That means both "simple" links like I used above as well as form tags.
It would also include AJAX links if the back end needs session information in order to return the correct data.
Comments
View All Articles by Raymond Camden
Receive
Our Daily Email of Breaking eBusiness News
About the Author:
Raymond Camden, ray@camdenfamily.com
http://ray.camdenfamily.com
Raymond Camden is Vice President of Technology for roundpeg, Inc. A long
time ColdFusion user, Raymond has worked on numerous ColdFusion books
and is the creator of many of the most popular ColdFusion community web
sites. He is an Adobe Community Expert, user group manager, and the
proud father of three little bundles of joy.
WebProNews RSS Feed
More Expert Articles Articles
Contact WebProNews |
|
|
eBUSINESS
RESOURCES |
|
|
 |
|
| About
WebProNews |
WebProNews is the number
one source for eBusiness News. Over 5 million eBusiness professionals read
WebProNews and other iEntry business and tech publications.
WebProNews provides real-time coverage of internet
business.
Free Email Newsletters:
|
|
|
|