Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am operating on Windows7 with IE8, Firefox, Google Chrome, Safari and Opera. JavaScript will work on the live site but it won't work on any local site I am testing in any browser. I don't get an error message or any feedback. The PC I am using is new. Any ideas?

share|improve this question
Are you browsing the page by opening it in your web browser (address bar starts with "file:///"), or do you have a web server setup locally that you're running the web page from (address bar start with "http://")? – Tim S. Van Haren Nov 19 '10 at 17:48
@Joe Where does your JavaScript reside (inline or external .js file)? If it's external, have you checked the source path (maybe it's a relative path)? – Gary Aug 19 '11 at 13:21
this is two years old. Has this been corrected? Do you mind posting your solution to help others? Please except an answer if any have solved the issue. If not create an answer and select it. Thanks. – Darth_Vader Mar 12 '13 at 19:41

Install an extension (such as NoScript) that is meant to block scripts... and tell it NOT to block scripts, and if the extension has an option to allow local content, enable that. This worked for me.

share|improve this answer
This is the likely thing. On for example Firefox with NoScript, even pages opened in localhost (or, for that matter) will have the NoScript blocking the JS by default. Permanently or temporarily allowing JS on localhost will "fix" that. – Juha Untinen Sep 19 '13 at 12:56

Some firewalls/antivirus also block these kind of stuff (eg Avast).

share|improve this answer

I guess your site will get the base URL to include the javascript into html from some php or whatever variables. I think there is the problem.

Post your <head> please. Look if its the right path and localhost or is in it.

share|improve this answer

Since it is applying to all browsers, something global under your control is affecting the websites.

1) Check your 3rd-Party Firewall settings if you have one. That may be set to block JavaScript.

2) Check the advanced settings of your router. Many have a setting to block JavaScript. A quick check would be to plug your computer directly into the modem -- if it is separate. Otherwise, login to the router and look for the JavaScript setting.

-- Patrick B.

share|improve this answer

Be sure that the scripts that you are trying to run are able to run on the local network. They may be referencing a file that is only located online.

Hope it helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.