title: How can I load JavaScript page refresh after click on link class?
body: <p>How I load JavaScript main page refresh only after user clicks on specific link class? I need it when the user clicks on the link, some JavaScript (or PHP, or whatever) detects that he has clicked on this class link and only then refreshes the origin page.</p>
  
  <p>Example: </p>
  
  <p>When user clicks on:</p>
  
  <pre><code>&lt;a class="link_id" target="blank" href="http://externallink.com"&gt;external link&lt;/a&gt;
  </code></pre>
  
  <p>JavaScript below auto load:</p>
  
  <pre><code>window.location.reload();
  </code></pre>
  
  <p>PS: I can not use the <code>onclick="location.reload()"</code>, button or similar method for many reasons (my project particularities, for example). Moreover, my HTML will be extensive and dirty. Moreover, it is not safe for the project to let users know that the refresh is through the onclick direct on link. So I'm looking for another way to do this.</p>