Quantcast
Channel: Techathon | Techathon
Viewing all articles
Browse latest Browse all 36

Change the page url address without redirecting in ajax call

$
0
0

As per security reasons, Browser does not support to change url without redirection. Because of this phishing may be possible. But when we make ajax request then we will be need to change URL as per ajax request url without redirection.

C$7.99 .COM Domains at Go Daddy

Solution to change page url without redirecting 

HTML 5 supports pushState() function if browser supports HTML5 then we can use like as:

window.history.pushState("", "", url);

 

Note: Above solution will not work on IE9 to change page url without redirection.

For the browser which does not support html5 , we can use history.js or window.location.hash


Viewing all articles
Browse latest Browse all 36

Trending Articles