title: How to use a button to prompt a download of a PDF?
body: <p>I've been using a button to prompt the download of a .doc file by doing this :</p>
  
  <pre><code>&lt;button type="btn02" class="btn02 btn-default centered" onclick="location.href='http://www.website.com/document/registration_form.docx'"&gt;Download Now!&lt;/button&gt;&lt;/h4&gt;
  </code></pre>
  
  <p>CSS</p>
  
  <pre><code>.btn02 {
  background-color: #FFF;
  outline-color: #000;
  display: inline-block;
  margin-left:20px;
  }
  </code></pre>
  
  <p>When I replace the .doc <em>file on the server</em> with a PDF (and adjust the code href to reflect that :</p>
  
  <p><code>onclick="location.href='http://www.website.com/document/registration_form.pdf'"</code>)</p>
  
  <p>... 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?</p>
  
  <p>Is there a way I can make the browser prompt a download for the PDF?</p>