0

I am trying to replace the full URL of the page with some other URL, and also don't want to redirect the page. I have tried the following methods but nothing helped.

window.history.pushState(null, null, 'www.google.com');

It just add the content as Hash, but didn't replace the full URL.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
Amrinder Singh
  • 5,300
  • 12
  • 46
  • 88
  • 1
    Possible duplicate of [Is it possible to use HTML5's pushState() across multiple domains?](https://stackoverflow.com/questions/8507641/is-it-possible-to-use-html5s-pushstate-across-multiple-domains) – crenshaw-dev May 07 '18 at 16:53
  • If you want to make the user believe he's browsing Google while he's actually on your site, that's something that browser vendors actively try to prevent. – Álvaro González Jun 10 '18 at 11:20

0 Answers0