67641/how-can-we-change-the-page-url-without-refreshing-the-page
How do I change the URL without refreshing the page? I've built a website with CodeIginer and I want to implement AJAX and JQuery in one of my pages. The problem is; when I load the content, the URL doesn't change. Let's say that I have the URL https://www.edureka.co/controller/function/param And another URL : https://www.edureka.co/controller/function/param2 How can I change the first URL to the second one when I click a button?
Hello @kartik,
In HTML5 you can change the URL:
window.history.pushState("object or string", "Title", "/new-url");
Thank You!!
Hii @kartik, HTML5 introduced the history.pushState() and history.replaceState() methods, which allow you ...READ MORE
Hii, In order to handle a timeout: var xmlHttp ...READ MORE
Hello @kartik, Instead of passing the entire object ...READ MORE
Hello @kartik, This is possible, but you'll have ...READ MORE
Hey @kartik, First you have to go to ...READ MORE
Named route is used to give specific ...READ MORE
Hello, This is simple you just need to ...READ MORE
Hey @kartik, Named routing is another amazing feature of ...READ MORE
Hello @kartik, This is simple you just need change ...READ MORE
Hello @kartik, Use the browser history to change ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.