CookieDuration Property

 

Type: Integer

 

Sets the number of days until expiration of the test cookie used to test for the PersisentCookies property.

 

The default value is 2 days. Legal values are between 1 and 1825 (365*5) inclusive. In general It's best to use as short a time as possible for expiration. The downside however to too short a value is that if the visitor's clock is off significantly it can cause problems. For example if you use a value of 2 days and the visitor's clock is set accidentally 3 days ahead, the test cookie used by BrowserHawk will expire immediately. This will result in BrowserHawk determining their PersisentCookies are disabled even if they are enabled.

 

The downside to using too long of a value is that, should they return to your site with persistent cookies disabled after having visited your site previously with these cookies enabled, BrowserHawk may still detect their cookies as enabled. For example, assume that on visit 1 a user's persistent cookies are enabled and BrowserHawk detects this as so. In the process the test cookie is still valid for 2 more days by default. If they then return 7 days later with their cookies set different, BrowserHawk will detect this. However if you had set the CookieDuration to say 30 days, the original test cookie will still persist and this can cause cookies to be detected incorrectly.

 

In general we do not recommend changing the default value unless you are experiencing problems.

 

See Also:

CookiesEnabled Property