Can HTML5 pushState () be used for multiple domains?

I have an almost impossible problem, but I hope someone can come up with some kind of working solution or workaround.

I have a website where I use History.js to make page changes on demand, to prevent the full page from loading when clicking links. However, my website has several domains, so the cross-domain policy does not allow changing the full URL with the host, only the relative path can be changed / set.

Can someone help me how to use History.js and overcome cross-domain policies? However, I cannot stop using these several domains, so a single domain is not a solution.

Thanks in advance for your help.

+4
source share
1 answer

This is not possible for security reasons. Enabling cross-domain pushState will allow malicious domains to disguise themselves as trusted.

+6
source

Source: https://habr.com/ru/post/1386353/


All Articles