Chrome浏览器下载了其他内容

时间:2019-05-30 05:22:45

标签: google-chrome

我下面有一个代码,该代码从我们的Azure存储中调用链接:

 var anchor = angular.element('<a/>');
 anchor.attr({
               href: encodeURI(resp.data.m_Item2),
               target: '_blank',
               download: 'invoice-' + now + '.pdf'
 })[0].click();

//below is the link being called
//https://mycompany.blob.core.windows.net/invoice/someuniqueid.pdf

我的问题是当我尝试更新文件并调用相同的链接时。它会下载旧文件,但是当我尝试在其他浏览器中粘贴相同的链接时,它会下载更新的文件(应该与我从chrome浏览器获得的文件相同)。

这怎么可能?我已经有了以下代码html标记,以避免缓存浏览器:

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />

0 个答案:

没有答案