Mega Code Archive

 
Categories / JavaScript Tutorial / Navigator
 

Navigator preference()

Syntax navigator.preference(name)     navigator.preference(name, value) The preference() method reads or sets any user preferences in the browser. For security reasons, reading a preference with the preference() method requires the UniversalPreferencesRead privilege. Setting a preference with this method requires the UniversalPreferencesWrite privilege. <html>     <head>     <title> Example of the preference method of the navigator object</title>     </head>     <body>     <script language="JavaScript">     <!--     navigator.preference(security.enable_java, false);     -->     </script>     </body>     </html>