Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome blocking javascript on localhost

I'm working on developing a site on my local machine (Windows 7 Ultimate x64) using WAMP, running APACHE v2.2.22, PHP 5.3.13, and MySQL v5.5.24. I'm developing using Chrome v 22.0.1229.94. I've got quite a bit of javascript in the site, however, and Chrome is relentlessly blocking javascript from running on the page.

Clicking on the little 'blocked javascript on this page' icon in the address bar includes the dropdown that has "Always allow Javascript on Localhost" checked off, and I also have a JavaScript exception in Chrome's settings explicitly saying to always allow JavaScript on 'http://localhost'.

Cookies are being allowed, "Allow all sites to run JavaScript" is checked off, and I have no idea as to why Chrome is not allowing the JavaScript to run.

Overall, it's not imperative to the project that I figure out a fix as both IE9 and Firefox 16.1 are allowing JavaScript and I can utilize them. I am simply curious if there's anything I can do to fix this in Chrome, as I would like to continue developing in Chrome.

like image 587
braican Avatar asked Oct 22 '12 21:10

braican


People also ask

Is JavaScript blocked on Chrome?

Disable and Enable JavaScript in Chrome's Settings Towards the bottom of the drop-down menu that appears, select “Settings”. Find the “Privacy and Security” section and select “Site Settings”. Finally, click “JavaScript” in the “Permissions” group. By default, JavaScript is enabled.

How do I enable localhost in Chrome?

1) Open Google Chrome browser. 2) Type chrome://flags/#allow-insecure-localhost in address bar. 3) Click on Enable. 4) Select "Relaunch Now" option displaying at the bottom after making the changes OR Re-open the chrome browser.

Why localhost website is not working?

Most likely causes: A default document is not configured for the requested URL, and directory browsing is not enabled on the server. Perhaps if you showed a screenshot of your Web App properties tab - right click project in Solution Explorer and got to properties.


1 Answers

If you notice that JavaScript is only blocked when the console is open (as some are saying), chances are that you disabled JavaScript in the console settings.

  1. Open the console.
  2. Click the vertical ellipsis icon (or the gear icon on older versions) in the upper right and go to settings.
  3. See if the "Disable JavaScript" checkbox is checked.
like image 78
Marques Avatar answered Oct 22 '22 23:10

Marques