[fix] don't use client-side router for same path on different origin
ADD
.changeset/kind-ducks-relate.md
+---
+'@sveltejs/kit': patch
+---
+
+[fix] don't use client-side navigation when clicking on a link to the same path on a different origin

MODIFY
packages/kit/src/runtime/client/client.js
packages/kit/src/runtime/client/client.js
@@ -202,7 +202,11 @@ export function create_client({ target, session, base, trailing_slash }) {
const current_token = (token = {});
let navigation_result = intent && (await load_route(intent, no_cache));
- if (!navigation_result && url.pathname === location.pathname) {
+ if (
+ !navigation_result &&
+ url.origin === location.origin &&
+ url.pathname === location.pathname
+ ) {
// this could happen in SPA fallback mode if the user navigated to
// `/non-existent-page`. if we fall back to reloading the page, it
// will create an infinite loop. so whereas we normally handle

[fix] don't use client-side router for same path on different origin (#4433)