Allow developers to dynamically modify the URL params in the web browser URL bar without requiring a page refresh. This would enable the creation of more dynamic apps that can include selected filters in the URL, making it easier for users to share links with others and see the same filtered results.
Example Use Case:
A user selects a set of filters in an app, and the URL is updated to reflect those filters.
The user copies and shares the link with others.
When others open the link, they see the same filtered results without needing to re-select the filters.
Desired Functionality: Similar to JavaScript's history.pushState method and URL API, allow developers to:
1-Create a new browser history entry setting the state and URL:
const state = { page_id: 1, user_id: 5 };
const url = "hello-world.html";
history.pushState(state, "", url);
2-Change query parameters in the URL without requiring a page refresh:
const url = new URL(location);
url.searchParams.set("foo", "bar");
history.pushState({}, "", url);
Benefits: This feature would enable developers to create more dynamic and user-friendly apps, improving the overall user experience.