Rate this article

Check if Cookies are enabled

Rating: 4.7/5 (3 votes cast)

How to check in cookies are enabled in a browser.

<script type="text/javascript">
var cookieEnabled=(navigator.cookieEnabled)? true : false

//if not IE4+ nor NS6+
if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){
document.cookie="testcookie"
cookieEnabled=(document.cookie.indexOf("testcookie")!=-1)? true : false
}
if (navigator.cookieEnabled == false) {
 alert("You need to enable cookies for this site to load properly!");
}

//if (cookieEnabled) //if cookies are enabled on client's browser
//do whatever

</script>

Adobe

ionCube Online PHP Encoder
Free PositiveSSL and WhoisGuard with Every Domain Purchase
XMS Systems

Although we try to ensure all the articles submitted are valid it is your responsibility to make sure you have backups before you use these suggestions on your pc or websites.
We do not take any responsibility for any data-loss, loss in functionality or any problem that might arise in what-ever way or form by making use of the information on this site.

"Friends of Interakt" has no connection to the Adobe Interakt Company