I have a blog here where I have used an anchor tag (<a>
) with the download
attribute for an HTML file:
<a href="http://www.idevelopweb.site/newsletters/welcome-simple/welcome-simple.html" download>Download it here <i class="fa fa-download" aria-hidden="true"></i></a>
Screenshot:
Expected: when the user clicks, it should open the dialogue box to download the file.
However, it navigates to the file. AFAIK, it was working earlier. Not sure what happened, or am I missing something? As per this w3schools example, ".html" file is allowed.
Any help would be much appreciated without using JavaScript.
EDIT: This blog is in a subdomain (http://blog.idevelopweb.site/) and I'm calling the HTML file which is in the root directory (http://www.idevelopweb.site/) so I have used an absolute path.