Force Download with JavaScript David Walsh Blog
penvjish