fileDownload

download a file without open a new window.


Keywords
js, download, browser
License
MIT
Install
bower install fileDownload

Documentation

fileDownload

download a file without open a new window.

Installation

npm install -g bower bower install --save fileDownload

Example

IE

        var url = '//code.jquery.com/jquery-3.0.0.min.js';
        var fileName = 'jquery-3.0.0.min.js';
        var fileDownload = fD(url, fileName);
        fileDownload.downloadByIframe();

others

        var url = '//code.jquery.com/jquery-3.0.0.min.js';
        var fileName = 'jquery-3.0.0.min.js';
        var fileDownload = fD(url, fileName);
        fileDownload.downloadByCreateObjectURL();