title: To set the flag value in javascript
body: <p>I have a flag which i set the value false. When user click on the sign off button then in need to the set the flag value true and on the body unload function no need to popup.</p>
  
  <pre><code>&lt;body onbeforeunload="return refershFunction()" onunload="clearLogin(); return true;"&gt;
  </code></pre>
  
  <p>This will show the popup only in case of flag value false. Is that possible?</p>