ColdFusion allows you to programmatically implement browser-side redirection using the <cflocation> tag. This tag has the two attributes shown in Table 5.1.
See Chapter 6, "The Application Framework," and Chapter 11, "Session State Management," for further information on maintaining client state. The url attribute is simply set equal to the HTML file or CFML template the browser should be redirected to. TIP A query string may be added to the end of the URL listed in the url attribute. This permits variables and their associated values to be passed to the redirection page. The ADDTOKEN attribute warrants further explanation. Clients are identified in one of two ways:
If you are using session state management, the variables (whichever are used) must be present for each and every request. If you are redirecting requests with <cflocation>, the session identifiers should be added to the URL. Using addtoken="yes" ensures that the necessary values are appended. |