Learn, Share, Build

197
September 21, 2017, at 8:37 PM

I would like to change address url without navigation. I do it like

    var url = window.location.href;
     url = url.split('#');
     var url_ = url[0] + '?task=product&url=' + selectedUrl;
  history.pushState(null, null, url_);

After then I enter on url in address bar and navigated to this url url[0] + '?task=product&url=' + selectedUrl. But the problem comes when I navigate back, the address was changed but not page(the page is not load for changed url).

Now, How can I navigate back and page load by this url?

Answer 1

history.pushState only manipulates the browser history. I'm a bit confused by you're wording but you can always just

window.location = url;

To redirect to where you want to go

READ ALSO
Learn, Share, Build

Learn, Share, Build

I would like to know how can we create a Custom record from a existing custom recordMy intention is to

125
Learn, Share, Build

Learn, Share, Build

I'd like to know how much memories are used during a single function call, what should I do?

158
Learn, Share, Build

Learn, Share, Build

Canvas not getting generated in IE edge only, instead a black box is appearingPlugin used in Canvg

188
Learn, Share, Build

Learn, Share, Build

I have a JSON file like this:

195