|
URLSessionFormat
DescriptionDepending
on whether a client computer accepts cookies, this function does
the following:
This
function automatically determines which identifiers are required,
and sends only the required information. It provides a more secure
and robust method for supporting client identification than manually
encoding the information in each URL, because it sends only required
information, when it is required, and it is easier to code.
ReturnsA URL;
if cookies are disabled for the browser, client and session data
are appended.
Function syntaxURLSessionFormat(request_URL)
Parameters
Parameter
|
Description
|
request_URL
|
URL of a ColdFusion page
|
UsageIn the
following example, the cfform tag posts a request
to another page and sends the client identification, if necessary.
If cookie support is detected, the function returns the following:
myactionpage.cfm
If
the detected cookie is not turned on, or cookie support cannot be
reliably detected, the function return value is as follows:
myactionpage.cfm?jsessionid=xxxx;cfid=xxxx&cftoken=xxxxxxxx
Example<cfform
method="Post"
action="#URLSessionFormat("MyActionPage.cfm")#">
</cfform>
|