0

I want to remove value from URL(window.location) without page refresh and add value in URL without reloading the page.

I used history.pushState() but i can't get perfect output.

history.pushState(null, null, '28');

This is base URL

https://www.example.com/color/27-28/fruits/1-2

NEW URL (Remove value) :- https://www.example.com/color/27/fruits/1-2

NEW URL (Add value) :- https://www.example.com/color/27-28-29/fruits/1-2

How to do it?

Please help me.

Thanks in advance :)

Tushar
  • 153
  • 10
  • For clarity, are you saying you want to change the window.location and *not* reload the page? – Taplar Aug 03 '17 at 05:16
  • Possible duplicate of [Modify the URL without reloading the page](https://stackoverflow.com/questions/824349/modify-the-url-without-reloading-the-page) – Seblor Aug 03 '17 at 05:21

0 Answers0