How to solve the invalidation of a tag download attribute under IE?

can be downloaded in Google browser, but it doesn"t work in IEdownload. Is there a solution?

<span class="img"><a :href="imgurl" :download="this.data.examName"><img src="../../../assets/images/wechat.png" alt=""></a></span>

to be clear in advance: url is a base64 image generated by the front end through a QR code plug-in, which has nothing to do with the back-end modification.

Jan.25,2022

if full compatibility is required, it is best to use the ajax background interface.


the backend server sets the type to binary stream


instead of using the download attribute directly, add the @ click event, determine the browser's support policy for the attribute in the function, create an a tag if it is supported, then call the click method, and use js to force him to download if it doesn't support it.

IE versions of 9 and before are NOT supported because the don't support a [download] or dataURL frame locations.

ask the server to add a Content-Disposition header


it is recommended not to use a tag, but to deal with click events instead. For compatibility issues, it is best to use regular tags that are supported by all major browser vendors.


Let the back end control zsbd

Menu