Tuesday, May 9, 2017

Change URL of HTML page without refreshing the page - Javascript

If you would like to replace a URL without page refresh.
I need to change:

https://example.com/en/SitePages/Projects.aspx
to

https://example.com/en/SitePages/ProjectsProduction.aspx

Use 'history.pushState' like this:

history.pushState(null, null, '/en/SitePages/ProjectsProduction.aspx');

No comments:

Post a Comment

Clearing Person/Group Values

To clear out or empty the values in person or group columns, how you do it depends on if the column is single-value or multi-value. For ...