Reputation: 93
<a href='1.html' download> Download 1.html </a>
For example the above HTML code, What should be the expectation when users clicks on the hyperlink??
As I am developing on a epub reader, would like to know the expectation of the above behavior of above case if the HTML (e.g. 1.html) is not included in the spine item.
Upvotes: 0
Views: 186
Reputation: 1309
According to W3Schools, the download
attribute does indeed do what you want: the file should be automatically downloaded instead of being viewed in the browser.
This is, of course, unrelated to whether the file 1.html
is included in the EPUB's spine - the spine indicates the reading order of the files from the manifest, and 1.html
could be in the EPUB or external, and even if in the manifest, it may or may not be in the spine! I guess you're trying to provide a download option in your EPUB reader for particular files from inside the EPUB package?
Upvotes: 1