Request Attributes

You can create attribute tags for properties of your website that are not exposed on NetSuite records, such as elements from browser requests made by shoppers as they view your website. For example, you could use the Attribute tag below to capture cookies from visitors to your site:

          <%=getCurrentAttribute('request','cookies')%> 

        
Note:

When using request attributes, also use nlescapehtml in your attribute tag to avoid cross-site scripting vulnerabilities. This additional parameter is most commonly used along with the querystring attribute. For more information see, Specifying Information for Display.

Site Properties

Attribute

Notes

Cookies associated with the current page

cookies

 

IP Address for the session

ipaddress

 

Referrer to the current page

referrer

 

Scheme of current page (http or https)

scheme

Use this attribute to create secure links. For more information, see Creating Secure Links.

URL parameters of the current page

querystring

 

User Agent HTTP header

useragent

Returns the visitor's browser type and version.

Creating Secure Links

When you display an image on your site that references an image on another site, you must use a fully qualified URL. If you use a URL that is not secure (one that starts with HTTP as opposed to HTTPS) on a store checkout page, then visitors on your site may see a popup warning indicating the page contains “nonsecure items.” To eliminate this popup warning, use an Attribute tag to construct a link returning HTTP or HTTPS as appropriate. For example:

          <%=getCurrentAttribute('request', 'scheme')%>://www.othersite.com/file.ext 

        

You can use this tag in a website template, and the resulting URL will always be a fully qualified URL appropriate for the page on which it displays, HTTP for shopping pages, and HTTPS for checkout pages:

http://www.othersite.com/file.ext

https://www.othersite.com/file.ext

Related Topics

Item Attributes
Information Item Attributes
Color Theme Attributes
Category Attributes
Customer Attributes
Site Attributes
Checkout Attributes
Order Confirmation Attributes
Creating Attribute Tags for Standard Records

General Notices