CookieCheckType Property

 

Type: Integer

 

Internet Explorer version 5.0 and higher provides two options for disabling cookies. One option is to disable session level cookies, which are cookies that are destroyed when the browser is closed. The other option is to disable persistent cookies, which are cookies that are stored on the user’s machine for a period of time as set by the cookie.

 

With Internet Explorer 6.0 and higher the user may accept session and persistent differently depending on your site's published security policy. Therefore without intentionally disabling one cookie type or the other, the browser may automatically make this choice for the user depending on their security settings. Fortunately BrowserHawk provides the ability to check for any combination of disabled cookies. The CookieCheckType property allow you to control your site's requirements for an end user's cookie settings.

 

Tip: Examine the cookies.asp example found in your BrowserHawk directory for a detailed understanding of how the CookieCheckType property is used.

 

After calling the GetExtPropertiesEx method to check for disabled cookies, the CookieCheckType property is used to tell you which, if any, of the cookie type checks the user’s browser failed. For example, if after calling the GetExtPropertiesEx method the CookiesEnabled property is False – and – you asked it to check for both disabled session and permanent cookies (as determined by your call to SetExtProperties and passing in either cookie_sess, cookie_perm, or cookie_both), you can determine which cookie check was failed by checking the CookieCheckType property value after the GetExtPropertiesEx method returns, as follows:

 1 = persistent cookies are disabled

 2 = session cookies are disabled

 3 = both permanent and session cookies are disabled

 

Note: This property currently only applies to IE 5.0 and higher since it is the only browser at the time of this writing which enables you to disable session Vs. persistent cookies independently. Therefore setting the CookieCheckType property has no effect (and is ignored) for all browsers except IE 5.0 and higher.

 

See Also:

CookiesEnabled Property