[thelist] Finding the URL of the page in ColdFusion

jeff jeff at members.evolt.org
Tue Apr 3 19:58:30 CDT 2001


: From: Faust at ThinkChurch.com
: How do you find the URL of the page
: currently being displayed by the browser?
: I want to know so I can get rid of any
: links to the page the user is currently
: viewing.

there are multiple parts to a url:

the protocol available via #cgi.https#:

http:// - off
https:// - on

the host available via #cgi.http_host#:


the path to the currently requested coldfusion document via


and the querystring via #cgi.query_string#:


how you code the site will determine which of these you need to take into

: Also, usually I would only wrap the second
: #dynamically_generated_link# in CFOUTPUT
: tags, but I chose readbility over performance
: for this e-mail.  :-)

fwiw, there's no appreciable performance gain (hardly even measurable except
on the biggest of sites) by using lots of <cfoutput> calls around variables
as opposed to wrapping large blocks of cf/html with a single <cfoutput>.
however, there *is* an appreciable readability gain by using the method of
large blocks wrapped in <cfoutput>

good luck,


mailto:jeff at members.evolt.org

More information about the thelist mailing list