javascript - Navigating to another page using location.href is not working properly -


iam using document.location.href navigate link. problem facing on clicking link browser loading icon starts if loading desired page second later stops , starts again , land me on desired page.

why browser loading twice while loading desired link.

i using simple javsscript.

<a href="javascript:void(0);" onclick="navigate_page('http://www.google.com');"> <div class="whl">     click me </div> </a> 

js

function navigate_page(q){     window.location.href = q;    } 

link code below

http://jsfiddle.net/6gz1gzat/1/


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -