What's odd about that? It's doing exactly what you asked. The real solution is to find the cause, however this will give you a single reload:
Originally Posted by W8 4me
if( window.localStorage )
if( !localStorage.getItem( 'firstLoad' ) )
localStorage[ 'firstLoad' ] = true;
localStorage.removeItem( 'firstLoad' );
Where used, return should be executed unconditionally and always as the last statement in the function.
That's my signature, it's not part of the damn post!