Mobile app version of vmapp.org
Login or Join
Annie201

: Is it possible to change from domains to phrases in the URL bar? You can change a URL like google.com to google.com/test without reloading the page by JavaScript. Is it possible to completely

@Annie201

Posted in: #Browsers #Javascript #Url

You can change a URL like google.com to google.com/test without reloading the page by JavaScript.

Is it possible to completely change the URL like from google.com to Welcom.To.The.Website using the URL bar as a display?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Annie201

1 Comments

Sorted by latest first Latest Oldest Best

 

@Jamie184

Is it possible to completely change the url like from google.com to Welcom.To.The.Website


No, you cannot change the domain (ie. the origin). Presumably you are referring to HTML5's pushState()? From Mozilla Developer help:


The new URL must be of the same origin as the current URL; otherwise, pushState() will throw an exception.


Apart from being confusing for users. This would also be a security issue. Pretending to be a site you are not - phishing. A website could also trick you into visiting another malicious website just by hitting the back button.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme