51

JavaScript tips —— 关于下载与导出的二三事

 5 years ago
source link: https://juejin.im/post/5b233e7a51882574cb646b3e
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
前言在项目中经常会遇到下载或导出服务端资源的需求,一般分为2种做法获取文件流,编码后下载获取文件的url,直接下载本文主要探讨第二种方法,在最后会提及文件流的方法。浏览器的安全策略在介绍方法之前,我们需要知道浏览器的一些安全机制,防止恶意代码对用户的破坏。现代

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK