Загрузка...

How to remove the hash from window.location (URL) with JavaScript without page refresh?

#short
#javascript
#window.location
#fragment-identifier
I have URL like: http://example.com#something, how do I remove #something, without causing the page to refresh?
I attempted the following solution:
window.location.hash = '';

However, this doesn't remove the hash symbol # from the URL.
up here: https://stackoverflow.com/a/5298684/290343

Видео How to remove the hash from window.location (URL) with JavaScript without page refresh? канала Code Samples
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять