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

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

    It happened in IE 11 for me. And I was calling the jquery .load function. So I did it the old fashion way and put something in the url to disable cacheing.

    $("#divToReplaceHtml").load('@Url.Action("Action", "Controller")/' + @Model.ID + "?nocache=" + new Date().getTime());
    

提交回复
热议问题