dpogue commented on issue #1324: URL: https://github.com/apache/cordova-ios/issues/1324#issuecomment-1542206012
The short answer is that you'll need to use a custom scheme instead of file URLs. The long answer is that what you're trying to do doesn't make sense with file URLs and is actually forbidden by the HTML specification: https://html.spec.whatwg.org/multipage/history.html#can-have-its-url-rewritten > 4. If _targetURL's_ [scheme](https://url.spec.whatwg.org/#concept-url-scheme) is `"file"`, and _targetURL_ and _documentURL_ differ in their [path](https://url.spec.whatwg.org/#concept-url-path) component, then return false. (Differences in [query](https://url.spec.whatwg.org/#concept-url-query) and [fragment](https://url.spec.whatwg.org/#concept-url-fragment) are allowed for `file:` URLs.) WebKit changed their behaviour in iOS 16.4 to match Chrome and the HTML spec: https://github.com/WebKit/WebKit/commit/78a55cf3976ce0b4543df42b03c335c5b89d27dd --- So it's fine to use `pushState` with `file:///` URLs to go from `index.html` to `index.html#/dashboard`, but it is not allowed to go from `indes.html` to `index.html/dashboard`. Maybe your framework has an option to use hash-based URLs for routing? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
