• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Name

cflocation

Synopsis

<cflocation>

Redirects the user’s browser to a new location. Due to the way ColdFusion assembles dynamic pages, you shouldn’t attempt to use the cflocation tag within a template after a cookie variable has been set. Setting a cookie variable and using cflocation afterward results in the cookie not being set. If you need to redirect to a different template after setting a cookie, consider using the cfheader tag instead, as in:

<cfcookie name="MyCookie" value="Hey, look at me!">
<cfheader name="Refresh" value="0; URL=http://www.example.com/mytemplate.cfm">

Or:

<cfheader name="Location" value="mytemplate.cfm">
<cfheader statuscode="302" statustext="Document Moved">

Attributes

URL="

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint