Dogstudio / highway

Highway - A Modern Javascript Transitions Manager
https://highway.js.org/
MIT License
1.43k stars 92 forks source link

Fatal error on transition to mismatching URL scheme, while remaining on the same domain #113

Closed xSpylon closed 2 years ago

xSpylon commented 2 years ago

Navigating between 2 different domains (such as http://example.com/ and https://google.com/) would be considered a cross-origin transition. In situations like these, Highway will trigger a native page load.

Navigating between 2 different pages on the same domain (such as https://example.com/page-1/ and https://example.com/page-2/) would be considered a same-site transition. Rather than triggering a native page load, Highway will do its magic and provide users with a fancy transition.

However, problems arise when we look at a different type of transition. Navigating between 2 pages with mismatching schemes while remaining on the same domain (such as https://example.com/page-1/ and http://example.com/page-2/) is actually considered a cross-origin transition as well, due to their changing schemes. Highway does not take this into account while trying to execute a fancy page transition.

For those interested, more information about these transitions can be found here.