Javascript function without any code in it -
i found following javascript code snippet part of popup window, causing browser ask if want close window.
window.onbeforeunload = function() {     settimeout(function() {         window.onbeforeunload = function() {};         settimeout(function() {             document.location.href = 'index.html';         }, 500);     },5);     return ''; };   i wondering these things:
- why use function without code in ( code line 3 )
 - why use window.onbeforeunload inside second time?
 
or try obfuscate purpose ?
 
 
  
Comments
Post a Comment