Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library


Category: Javascript Codes Library >> Cookies >> Cookies Enabled Sniffer

Code Snippet </> Info

Snippet Name: Cookies Enabled Sniffer

Description: Detect if a visitor has disabled their cookies. If so, spawn an alert prompt.

Compatible Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser

Note: Adjust the alert message to suit your needs.

Author: SnapBuilder <>

Last Modified: 2019-12-09 02:27:14

Language: javascript

Highlight Mode: javascript

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor

  About Copying
Copied To Clipboard!

<html> <head> <title>Cookies Enabled Sniffer Javascript Code Snippet</title> <script> <!-- Cookies Enabled Sniffer Found In The Free Public Codes Library if (navigator.cookieEnabled == 0) { alert("You need to enable cookies for this site to load properly!"); } </script> </head> <body> <p>Simply put this code snippet in your document HEAD area.</p> <p>If the visitors cookies are disabled, an alert prompt will spawn.</p> </body> </html>

[ Snippet Options ]


© 2002 -  Snap Builder Public Codes Library