You are here: Home > Google Chrome Tutorial

How to enable or disable JavaScript in Google Chrome?

August 27, 2009 20:23 PDT

Posted by Andrew.

Updated on Mar 10, 2010: The Chrome 4.x has been added an option to enable/disable JavaScript in Options dialog. So we needn't change the Chrome shortcut parameter by manual. I re-wrote a new tutorial about enable/disable JavaScript in Chrome, please click here to view it.


Some people want to disable JavaScript for security reason. Unfortunately, There is no way to disable/enable JavaScript in Google Chrome as you can do with other browsers by changing a simple setting in its Options dialog. We must add -disable-javascript parameter to Google Chrome shortcut by manual. In this tutorial we will see how to turn JavaScript on/off with following 4 steps:

1. Right click the Google Chrome icon in your desktop, then click Properties.

2. Click Shortcut tab.

3. Add -disable-javascript parameter in the Target field.

4. Click the OK button.

Screenshot image: Disable JavaScript in Google Chrome

Screenshot image: Disable JavaScript in Google Chrome

In order to enable JavaScript for Google Chrome again, just remove -disable-javascript parameter in the Target field.

Other parameters for Google Chrome

  • -disable-images
  • -disable-java
  • -disable-plugins
  • -disable-popup-blocking
  • -start-maximized

Other resource about Google Chrome and JavaScript



#1  posted on December 17, 2009 23:11 PST
how to enable javascript in chrome. whenever i open youtube it says enable javasript

#2  posted on January 08, 2010 18:50 PST
how to enable those disabled images during run? I mean without restarting chrome?

#3  posted on March 02, 2010 19:50 PST
Thanks so much!

#4  posted on April 13, 2010 01:26 PDT
This doesn't work.

My target field doesn't have "disable javascript" at the end.

But javascript doesn't work.

Try again, Andrew.

#5  posted on May 06, 2010 03:29 PDT
hei nice info.............
thanx dude


Regards

#6  posted on June 20, 2010 11:12 PDT
alguien tiene ayuda para este error:



Java Plug-in 1.6.0_20
Usar versión JRE 1.6.0_20-b02 Java HotSpot(TM) Client VM
Directorio local del usuario = C:Documents and SettingsMarce

----------------------------------------------------
c: borrar ventana de consola
f: finalizar objetos en la cola de finalización
g: liberación de recursos
h: presentar este mensaje de ayuda
l: volcar lista del cargador de clases
m: imprimir sintaxis de memoria
o: activar registro
q: ocultar consola
r: recargar configuración de norma
s: volcar propiedades del sistema y de despliegue
t: volcar lista de subprocesos
v: volcar pila de subprocesos
x: borrar antememoria del cargador de clases
0-5: establecer nivel de rastreo en <n>
----------------------------------------------------

security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition value null
security: property package.definition new value com.sun.javaws
security: property package.definition value com.sun.javaws
security: property package.definition new value com.sun.javaws,com.sun.deploy
security: property package.definition value com.sun.javaws,com.sun.deploy
security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security: property package.definition value com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
basic: Receptor de progreso agregado: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@b166b5
basic: Plugin2ClassLoader.addURL parent called for http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser.jar
network: No se ha encontrado entrada de caché [URL: http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser.jar, versión: null]
network: Conectando http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser.jar con proxy=DIRECT
network: Conectando http://telefonica.movistar.com.mx:80/ con proxy=DIRECT
basic: Cargando Miniaplicación de Java
java.net.SocketException: Invalid argument: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$700(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
network: No se ha encontrado entrada de caché [URL: http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser.jar, versión: null]
network: Conectando http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser.jar con proxy=DIRECT
network: Conectando http://telefonica.movistar.com.mx:80/ con proxy=DIRECT
network: No se ha encontrado entrada de caché [URL: http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser.jar, versión: null]
network: Conectando http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser.jar con proxy=DIRECT
network: Conectando http://telefonica.movistar.com.mx:80/ con proxy=DIRECT
java.net.SocketException: Invalid argument: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$700(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
network: No se ha encontrado entrada de caché [URL: http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser.jar, versión: null]
network: Conectando http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser.jar con proxy=DIRECT
network: Conectando http://telefonica.movistar.com.mx:80/ con proxy=DIRECT
network: No se ha encontrado entrada de caché [URL: http://telefonica.movistar.com.mx/extranet/menu/, versión: null]
network: No se ha encontrado entrada de caché [URL: http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser.class, versión: null]
network: Conectando http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser.class con proxy=DIRECT
network: Conectando http://telefonica.movistar.com.mx:80/ con proxy=DIRECT
network: No se ha encontrado entrada de caché [URL: http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser/class.class, versión: null]
network: Conectando http://telefonica.movistar.com.mx/extranet/menu/SiteBrowser/class.class con proxy=DIRECT
network: Conectando http://telefonica.movistar.com.mx:80/ con proxy=DIRECT
basic: cargar: clase SiteBrowser.class no encontrada.
cargar: clase SiteBrowser.class no encontrada.
java.lang.ClassNotFoundException: SiteBrowser.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Invalid argument: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Excepción: java.lang.ClassNotFoundException: SiteBrowser.class
Ignored exception: java.lang.ClassNotFoundException: SiteBrowser.class
security: Accediendo a las claves y el certificado del perfil de usuario de Mozilla: null

#7  posted on June 29, 2010 08:56 PDT
Thank for u tutorial, good job

#8  posted on January 14, 2011 02:50 PST
there is no disable javascript. but still the facbook homepage says to enable javascript

#9  posted on June 16, 2011 00:16 PDT
i have done.but it is working only IE and Fire
fox.how to disable html button using javascript in googlechrome and safari browser

#10  posted on January 09, 2012 21:04 PST
That's a genuinely impressive anwser.

Leave your comment
If you want to leave your comment on this article, simply fill out the next form:
Name: * Requirement
E-mail: Optional (won't be published)
Website / Blog: Optional
Are you a human? For anti spammer, please calculate following expression:
5 x 5 + 2 = * Requirement
Comment:
* Requirement
You can use these tags:
[b] Text [/b]: Bold text
[quote] Text [/quote]: Quote text