HTML | DOM Navigator taintEnabled() Method

The Navigator taintEnabled() method was best avoided in JavaScript version 1.2, and has been deprecated since then to prevent run-time errors in the future. Data Tainting was a security feature to destroy or remove the highly infectious data used by JavaScript 1.2. It has been completely discarded by now; this method only available for maintaining compatibility with very old scripts with limited browser support. It returns a Boolean value that shows whether the browser has data tainting method enabled. The NavigatorID.taintEnabled() method would always returns Boolean false value.



Return Value:
It returns a Boolean value, specifying whether the browser has data tainting feature enabled.

Example: It would return true if data tainting is supported and enabled, and it returns false if the feature is disabled.





<!DOCTYPE html>
        HTML DOM Navigator taintEnabled() Method
    <h2>HTML DOM Navigator taintEnabled() Method
    <p id="geeks"
        Welcome to GeeksforGeeks!
    <input type="button"
           value="Is data tainting in my browser enabled?"
    <script language="JavaScript">
        function functionGFG() {
            // data tainting is enabled or not.
            var temp = navigator.taintEnabled();


Before Click:

After Click:

Supported Browsers:
This method has long been deprecated and beware before using it because at anytime it may be withdrawn. Despite being removed it is supported by the following browsers:

  • Opera 3.5
  • Internet Explorer 4.0/Edge.


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.