Why does JavaScript only work after opening developer tools in IE once?

前端 未结 12 2088
予麋鹿
予麋鹿 2020-11-22 02:20

IE9 Bug - JavaScript only works after opening developer tools once.

Our site offers free pdf downloads to users, and it has a simple \"enter password to download\" f

12条回答
  •  礼貌的吻别
    2020-11-22 02:51

    Besides the 'console' usage issue mentioned in accepted answer and others,there is at least another reason why sometimes pages in Internet Explorer work only with the developer tools activated.

    When Developer Tools is enabled, IE doesn't really uses its HTTP cache (at least by default in IE 11) like it does in normal mode.

    It means if your site or page has a caching problem (if it caches more than it should for example - that was my case), you will not see that problem in F12 mode. So if the javascript does some cached AJAX requests, they may not work as expected in normal mode, and work fine in F12 mode.

提交回复
热议问题