- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
You can use the replaceState method on the history API to remove the hash.
The replaceState() method modifies the current history entry, replacing it with the state objects, title, and URL passed in the method parameters. This method is particularly useful when you want to update the state object or URL of the current history entry in response to some user action.
To remove the hash you can use −
history.replaceState(null, null, ' ');
- How to refresh a page in Firefox?
- HTML DOM Location hash Property
- How to refresh a JSP page at regular interval?
- How to remove the title bar in a Tkinter window without using overrideredirect() method?
- How to get the title and URL of the page in Selenium with python?
- How to copy from clipboard using tkinter without displaying a window
- How to reload the current page without losing any form data with HTML?
- How to specify the URL of the page the link goes to in HTML?
- How to automatically redirect a Web Page to another URL?