How to change the url in JavaScript, adding parameters, but not restarting the page?

How to use History API?

    1 answer 1

    Google is not destiny to visit?
    The first and second link in the top.
    There everything is painted in detail, there is no sense to copy-paste here.

    • It does not say how to make mysite.com?param1=1¶m2=2 from the line mysite.com - Rakzin Roman
    • @TwoRS, Doesn’t history.pushState({}, '', 'mysite.com?param1=1¶m2=2') work? - user31688
    • A. Thanks for that, colleague. What kind of doctor are you? ))) - Rakzin Roman
    • @TwoRS, I am the Doctor of all sciences and funny things :) - user31688
    • :) Clear. I am a therapist. If you have questions, write VKontakte :). And another question, if the user selected the elements, the url changed accordingly, then he switches to another page. But suddenly he wants to come back, I make the option that all the selected elements are restored by the get request, is there any way to cache it or save it in the history, that he would press the back button and go back to all the selected elements? - Rakzin Roman