That's why I have the side-note on compatibility. And according to your source both IE and Safari don't support this approach, or at least not yet : Anyhow, if you want all browsers to force download I suggest checking some of the other answers instead The solution is easy but unfortunately not supported in IE and Safari.
Instead of linking to the. TravisO TravisO 9, 4 4 gold badges 34 34 silver badges 44 44 bronze badges. Please don't make up headers and send them. Could you update your answer. Be careful when using this code verbatim, though. This code is likely dangerous in another way. Could be used by an attacker to attempt to scan your internal network for exposed PDF files. Not to mention how easy it would be to bypass any "sanity checks" you think you'll be doing to the "file" parameter.
Show 8 more comments. Alex V Alex V The readfile function is indeed faster. I personally recommend using this answer instead of the accepted one — Jose Garrido.
Rob W Rob W k 76 76 gold badges silver badges bronze badges. TecBrat Yes, but that was what the OP asked. TecBrat or put the. Alex W Alex W Sudden Def Sudden Def 8, 3 3 gold badges 17 17 silver badges 8 8 bronze badges. I know I am very late to answer this but I found a hack to do this in javascript. Shivek Parmar Shivek Parmar 2, 2 2 gold badges 31 31 silver badges 42 42 bronze badges.
MacX YouTube Downloader. Microsoft Office YTD Video Downloader. Adobe Photoshop CC. VirtualDJ Avast Free Security. WhatsApp Messenger. Talking Tom Cat. Clash of Clans. Subway Surfers. TubeMate 3. Google Play. Adele convinces Spotify to remove shuffle from all albums. PS5 restock updates. Black Friday deals. Windows Windows. Most Popular. Welcome to GeeksforGeeks. Download Image. By clicking the download button. Recommended Articles. Article Contributed By :. Easy Normal Medium Hard Expert.
Writing code in comment? Please use ide. Surendra Narayan Roy Said August 12, at PM. Ravi Kumar Said Great work bro, thanx A lot June 1, at PM. Abhijit Said May 8, at AM. Shaalan Said
0コメント