Su Deng1,226 Points
the download thing doest work for me
i tried to copy the code in this video for $pdfs.attr('download', true);
but it doest download for me, it just opens the page.
Richard Eldridge8,224 Points
After checking out the known issues on caniuse.com it appears the newest versions of Chrome no longer support this feature. The graphic indicates that the "download" attribute is supported; however, it appears that it is now "ignored" for cross-origin links.
Edit: Alan M. posted a possible solution on another post that worked for me.
Joseph Wasden20,373 Points
@3:14 in the video, "A quick note here, some older browsers don't support the download attribute, and if you're using Firefox, the download attribute won't trigger if the PDF points to an external website."
Here's a list of what supports (and doesn't support) the download attribute.
something to consider.
Jeff SandersPro Student 7,100 Points
Su Deng, please mark a response as the answer to your question.
Neither "download" nor "target='download'" works in new version of Chrome. looks like its not supported anymore.
Roger Hwang3,848 Points
I have Chrome version 70 and caniuse.com says it supports the download attribute, but not cross-origin links? Basically when the site you're downloading from is not from the site you're currently on?
I found that if you write the following code:
It download the file...