Chrome blocking javascript on localhost

前端 未结 3 1216
独厮守ぢ
独厮守ぢ 2020-12-30 18:39

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 Chrom

相关标签:
3条回答
  • 2020-12-30 19:15

    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.
    0 讨论(0)
  • 2020-12-30 19:22

    You can give your local server a domain name, may be that would help.

    1. Open C:\Windows\System32\drivers\etc\hosts in notepad
    2. Edit that file add a new line at the end 127.0.0.1 mydomain.com
    3. Save, now goto chrome and type in http://mydomain.com/ this should point to your local server.

    Since you nolonger run on "localhost" may be chrome will let you pass.

    Let's me know if that works. Good luck!

    0 讨论(0)
  • 2020-12-30 19:35

    I have the same issue, but only when the console is open. When the console is closed, JavaScript loads fine on localhost. Makes it hard to debug things though....

    I got around it by opening localhost in an incognito window.

    0 讨论(0)
提交回复
热议问题