[Webkit-unassigned] [Bug 226323] New: [iOS 14.5/Safari 14] Can't go back and render previous page properly after "location.href"
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 27 03:18:19 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=226323
Bug ID: 226323
Summary: [iOS 14.5/Safari 14] Can't go back and render previous
page properly after "location.href"
Product: WebKit
Version: Safari 14
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Major
Priority: P2
Component: History
Assignee: webkit-unassigned at lists.webkit.org
Reporter: okamoto.takuya.ot at gmail.com
Created attachment 429863
--> https://bugs.webkit.org/attachment.cgi?id=429863&action=review
reproducing steps
# Reproducible environment
- Safari and Webview on iOS 14.5
- Safari 14.1 on Mac 10.15
# Reproducing steps
Please see the attached video, too.
1. Access to SiteA located in "https://siteA.com/"
2. In SiteA, run JS code like this immediately:
```
<script type="text/javascript">
location.href="https://siteB.com/" // SiteB
</script>
```
This page of SiteA won’t be recorded in the browser’s history since this "location.href" is called without user interactions.
https://html.spec.whatwg.org/multipage/history.html#location-object-setter-navigate
3. After arriving at SiteB, click browser's history back button to go back to SiteA
4. I expected to see the page before SiteA, but the issue below occurs
# Issue
Even though the browser's URL bar shows SiteA's URL, but I can't see SiteA contents because:
- The browser shows a blank screen instead (iOS)
- Or, the browser keeps and shows previous page's contents of SiteA (Mac)
## Note
- When SiteA and SiteB are on a same domain, this issue isn't reproduced.
- Sometimes the issue won't occur anymore after accessing SiteA multiple times. In that case, once clear the browser cache, you can reproduce it again.
# Reproducible page
page: https://redirect-issue.web.app
code: https://github.com/cola119/safari-redirect-issue
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210527/074fbb36/attachment.htm>
More information about the webkit-unassigned
mailing list