使用 Internet Explorer 检测文件下载
Detect file download with internet explorer
我正在寻找一种方法来检测用户何时在 Internet Explorer 中下载文件事件,但我还没有找到方法,是否可行?怎么样?
您可以尝试使用 jQuery File Download plugin. For more information, you could refer to 在浏览器中检测文件下载。
Note - You must also write a cookie in conjunction with using this plugin in the server's response headers
但我认为由于安全问题,您无法仅使用客户端代码实现您的目标。从浏览器端,我们无法从浏览器访问文件保存对话框,因为它是 OS 级别。从文件端看,您无权访问服务器中的文件,也不知道文件的状态。您还可以参考此线程中的 以获取更多信息。
我正在寻找一种方法来检测用户何时在 Internet Explorer 中下载文件事件,但我还没有找到方法,是否可行?怎么样?
您可以尝试使用 jQuery File Download plugin. For more information, you could refer to
Note - You must also write a cookie in conjunction with using this plugin in the server's response headers
但我认为由于安全问题,您无法仅使用客户端代码实现您的目标。从浏览器端,我们无法从浏览器访问文件保存对话框,因为它是 OS 级别。从文件端看,您无权访问服务器中的文件,也不知道文件的状态。您还可以参考此线程中的