Thursday, 7 August 2014

Script For Page Reload Page One Time After Loading the Page

Given Script load the page one time after loading the page ....

<script type='text/javascript'>

(function()
{
  if( window.localStorage )
  {
    if( !localStorage.getItem( 'firstLoad' ) )
    {
      localStorage[ 'firstLoad' ] = true;
      window.location.reload();

    }
    else
      localStorage.removeItem( 'firstLoad' );
  }
})();

</script>

No comments:

Post a Comment