Change URL Without Redirecting Using AJAX Call – Quick Tips

Author: | Posted in PHP, Quick Tips No comments

For security concerns, Browser does not support to the functionality–change url without redirecting. Because of this phishing may be possible. But when we make an ajax request then we need to change URL as per ajax request url without redirection.

Solution@to change page url without redirecting:

Bowers doesn’t have any direct support to change url without redirection, but we can make it with HTML5.
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.

(Visited 48 times, 1 visits today)