Q:

appending location var has no effects in jquery?

Its totally strange for me where i have a requirement where i need to redirect to different URL by changing the url....here what i am doing 
 var newURLString = window.location.pathname +"/"+ data.area;
              window.location.href = newURLString;
               alert(window.location.href);
            location.reload();

This code works perfectly but the STRANGEST thing is if i remove alert it doesn't works! Loads the current URL.....
NOTE:alert shows me the correct url and redirects to correct url but removing this loads to current url

A:

just remove location.reload(); You dont need it. It just reloads the current page.
var newURLString = window.location.pathname +"/"+ data.area;
                  window.location.href = newURLString;
                   alert(window.location.href);
                //location.reload();

