I've been using a button to prompt the download of a .doc file by doing this :
<button type="btn02" class="btn02 btn-default centered" onclick="location.href='http://www.website.com/document/registration_form.docx'">Download Now!</button></h4>
CSS
.btn02 {
background-color: #FFF;
outline-color: #000;
display: inline-block;
margin-left:20px;
}
When I replace the .doc file on the server with a PDF (and adjust the code href to reflect that :
onclick="location.href='http://www.website.com/document/registration_form.pdf'"
)
... It only opens the PDF in the browser Window instead of prompting it to be downloaded by the viewer... Why does the document format change this?
Is there a way I can make the browser prompt a download for the PDF?