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

前端 未结 12 2115
予麋鹿
予麋鹿 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:30

    Here's another possible reason besides the console.log issue (at least in IE11):

    When the console is not open, IE does pretty aggressive caching, so make sure that any $.ajax calls or XMLHttpRequest calls have caching set to false.

    For example:

    $.ajax({cache: false, ...})
    

    When the developer console is open, caching is less aggressive. Seems to be a bug (or maybe a feature?)

提交回复
热议问题