While redirecting using the cflocation tag it is successfully passing to specified URL.
But the thing is I couldnt understand the use of ADDTOKEN attribute in this tag.Because redirection occurs independent of the Yes/No values of that attribute . Please can any one help me by providing a simple example? It would be much appreciated.

Recommended Answers

All 2 Replies

While redirecting using the cflocation tag it is successfully passing to specified URL.
But the thing is I couldnt understand the use of ADDTOKEN attribute in this tag.Because redirection occurs independent of the Yes/No values of that attribute . Please can any one help me by providing a simple example? It would be much appreciated.

I believe this is the wrong section to post this question. You are likely to get a quicker and more accurate answer in the Web Development > ColdFusion section.

Because redirection occurs independent of the Yes/No values of that attribute

The AddToken attribute relates to client/session management. It has no affect on redirection. Only what's passed in the url. When addToken="yes", CF appends several client tokens (cfid, cftoken and possibly jsessionid) as URL parameters

So this

<cflocation url="http://www.yoursite.com/path/to/products.cfm?productid=4" addToken="yes">

becomes

http://www.yoursite.com/path/to/products.cfm?productid=4&cfid=xxxx&cftoken=xxxx&jsessionid=xxxxx"

If addToken="no", CF doesn't append the extra parameters to the URL

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.