title: Redirect the page if the print is successful - JavaScript
body: <pre><code>javascript:window.print();
  document.location.href = "https://www.google.com/"; 
  </code></pre>
  
  <p>I use above code to print a page I'm in then redirects it. What it does is it redirects the page if the print is successful or fail. </p>
  
  <p>How can I redirect the page if the page is successfully printed only ? </p>