LassoScript Utility
Basics Browse Detail

[Referer_URL]

Tag Link [Referer_URL] Category Link
Type Substitution Source Available No
Support Synonym Version 2.5
Change Unchanged Data Source Any
Output Type String Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 2.5

Description

[Referer_URL] returns a link to the previous page which the current visitor was viewing in their Web browse. The referrer is sent along with each HTTP request and may differ depending on what browser the visitor is using.

The referrer can be used to determine whether a visitor followed a link from another page in the current Web site or if they followed a link from a third-party Web site.

Note: "Referer" is a mispelling of the word "Referrer" which was used as part of the original HTTP specification. Both names are supported interchangeably, but "Referrer" is the proper spelling.

The container tags [Referer] ... [/Referer] can be used to create an HTML anchor tag pair <a href="..."> ... </a> with the same URL that [Referer_URL] provides.

Syntax

<a href="[Referer_URL]"> Current Action </a>

[Referer_URL]

Parameters

Optional Parameters
Encoding Keyword Specifies the encoding for the tag's return value. Tags are encoded using -EncodeHTML by default if their value is output on a format file. No encoding is applied to nested tags unless an explicity encoding keyword is specified. One of -EncodeBreak, -EncodeHTML, -EncodeNone, -EncodeRaw, -EncodeSmart, -EncodeStrictURL, -EncodeURL, -EncodeXML.

Examples

To check whether the visitor has followed a link from a page in the same site:

Use the [Referrer_URL] tag. The following example checks if the referrer URL contains the name of the current server www.example.com. If it does, then the visitor followed a link from a page that was served from the same Web server as the current page.

[If: (Referrer_URL) >> 'www.example.com']
  <br>You followed a link from a page on this server.
[/If]

<br>You followed a link from a page on this server.