window.href.location not working in chrome

前端 未结 1 409
走了就别回头了
走了就别回头了 2021-01-27 08:47

Please read the question before flagging as duplicate. I\'m trying to download a file by redirecting with Javascript to a controller action in my ASP.NET MVC3 project. It works

1条回答
  •  天涯浪人
    2021-01-27 09:15

    I changed the script with the following:

    
    

    You see, I added a new controller action, which only controls if the file exists and call the file action. This works across all browsers, at least the ones I have. I don't exactly know, but this might be a bug or security precaution in Chrome.

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