0

I'm building a html webpage and wondered if it's possible to have a link that when clicked will download the html contents of a specific div (on the same page) as a .html or .zip file.

I've searched for javascript or jquery examples but can't seem to find one that works cross browser. I tried the HTML5 download attribute but that doesn't work for older browsers/IE.

Thanks

user1156756
  • 157
  • 2
  • 3
  • 10

1 Answers1

0

Here you have a table with the browsers and thier compatibility with attribute download that Mike posted you in a comment: http://caniuse.com/download

And the actual tag with attribute is (just for sure you typing it right):

<a href="your_path_to_file" download>Download Me!</a>

-- it will work only in firefox, chrome and opera as it is in a table.

Sulthan Allaudeen
  • 11,330
  • 12
  • 48
  • 63