Issue with Browser Back Button Skipping Pages in History on Chrome for iOS

382 views
Skip to first unread message

Steve Rehm

unread,
Oct 2, 2024, 2:45:37 PM10/2/24
to navigation-dev

Hey all,

I'm running into an issue with Chrome on iOS where the back button either skips multiple pages or jumps to the previous domain. This is a huge deal, especially in scenarios like a single-page application (SPA), where each step in the flow is crucial for conversion. Losing that precise navigation can really hurt the user experience.

Has anyone else come across this? Any fixes or workarounds would be really helpful.

Thanks in advance!
Steve

Rakina Zata Amni

unread,
Oct 3, 2024, 3:23:24 AM10/3/24
to Steve Rehm, navigation-dev, shiva...@chromium.org, Charlie Reis
Maybe the entries are somehow marked as should be skipped here? (+cc Shivani and Charlie who I think might know about this area)

--
You received this message because you are subscribed to the Google Groups "navigation-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to navigation-de...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/navigation-dev/8d44b952-441f-4531-b45a-f9651cb0bfeen%40chromium.org.

Charlie Reis

unread,
Oct 3, 2024, 12:09:56 PM10/3/24
to Rakina Zata Amni, Ali Juma, Steve Rehm, navigation-dev, shiva...@chromium.org
This report is on iOS, which I don't think uses that code.  Maybe @Ali Juma can help point this in the right direction?

Charlie

Ali Juma

unread,
Oct 3, 2024, 12:56:26 PM10/3/24
to Charlie Reis, Rakina Zata Amni, Steve Rehm, navigation-dev, shiva...@chromium.org
Chrome on iOS uses WebKit, which has logic to skip over navigation items that are added without user interaction. The behavior should be the same on Safari on iOS. The intent is to protect the user from websites that try to prevent users from leaving, by constantly adding navigation items using pushState so that the Back button never takes the user away from the site.

If you can reproduce this bug in both Chrome and Safari, please file a WebKit bug (at bugs.webkit.org) with more details. If it only reproduces in Chrome on iOS, please file a bug at crbug.com.

Thanks!
Ali

Steve Rehm

unread,
Oct 4, 2024, 10:52:41 AM10/4/24
to navigation-dev, Ali Juma, Rakina Zata Amni, Steve Rehm, navigation-dev, shiva...@chromium.org, Charlie Reis
Thank you for your feedback! 

I am happy to report the bug. But maybe you can give me an idea about how WebKit distinguishes whether it is a user interaction or not?

The behavior could not be reproduced in other browsers so far. There was also different behavior on different Chrome and iOS versions. However, there is no recognisable pattern so far.
  • iPhone 14 Pro, iOS 17.6.1, Chrome 128 (works partially)
  • iPhone 11 Pro, iOS 15.0.2, Chrome 125 (works)
  • iPhone SE, iOS 17.6.1, Chrome 129 (does not work)
  • iPhone XR, iOS 17.5.1, Chrome 129 (does not work)
  • iPhone 15, iOS 17.4.1, Chrome 129 (works)
  • iPhone 15, iOS 17.5.1, Chrome 129 (does not work)
  • iPhone 15 Pro Max, iOS 18, Chrome 129 (does not work)
I am unsure whether this is really a bug or an implementation detail that needs to be taken into account when navigating (be it soft or hard navigation). We have the behavior in single and multi-page applications.

Thanks!
Steve

Ali Juma

unread,
Oct 4, 2024, 10:52:41 AM10/4/24
to Shivani Sharma, Steve Rehm, navigation-dev, Rakina Zata Amni, shiva...@chromium.org, Charlie Reis

On Fri, Oct 4, 2024 at 10:25 AM Shivani Sharma <shiva...@google.com> wrote:
@Ali Juma : Thanks for the context! Is there a bug/document mentioning webkit's skipping behavior? Mostly curious to see how similar/different it is with chromium's behavior. Thanks!

On Fri, Oct 4, 2024 at 10:15 AM Ali Juma <aj...@google.com> wrote:
In Chrome on iOS, this behavior (of skipping over items added without user interaction) is enabled on iOS 17.5+ in Chrome 127+.

WebKit looks at whether there was user interaction within the past 10 seconds, *and* that this interaction has not already been "consumed" by certain APIs.

https://webkit.org/blog/13862/the-user-activation-api/ is a good reference for these concepts, explaining what counts as user interaction, and which APIs can "consume" a user interaction.



--
Shivani

Shivani Sharma

unread,
Oct 4, 2024, 10:52:41 AM10/4/24
to Ali Juma, Steve Rehm, navigation-dev, Rakina Zata Amni, shiva...@chromium.org, Charlie Reis
@Ali Juma : Thanks for the context! Is there a bug/document mentioning webkit's skipping behavior? Mostly curious to see how similar/different it is with chromium's behavior. Thanks!

On Fri, Oct 4, 2024 at 10:15 AM Ali Juma <aj...@google.com> wrote:
In Chrome on iOS, this behavior (of skipping over items added without user interaction) is enabled on iOS 17.5+ in Chrome 127+.

WebKit looks at whether there was user interaction within the past 10 seconds, *and* that this interaction has not already been "consumed" by certain APIs.

https://webkit.org/blog/13862/the-user-activation-api/ is a good reference for these concepts, explaining what counts as user interaction, and which APIs can "consume" a user interaction.


On Fri, Oct 4, 2024 at 3:12 AM Steve Rehm <cremed...@googlemail.com> wrote:


--
Shivani

Ali Juma

unread,
Oct 4, 2024, 10:52:41 AM10/4/24
to Steve Rehm, navigation-dev, Rakina Zata Amni, shiva...@chromium.org, Charlie Reis
In Chrome on iOS, this behavior (of skipping over items added without user interaction) is enabled on iOS 17.5+ in Chrome 127+.

WebKit looks at whether there was user interaction within the past 10 seconds, *and* that this interaction has not already been "consumed" by certain APIs.

https://webkit.org/blog/13862/the-user-activation-api/ is a good reference for these concepts, explaining what counts as user interaction, and which APIs can "consume" a user interaction.


On Fri, Oct 4, 2024 at 3:12 AM Steve Rehm <cremed...@googlemail.com> wrote:
Reply all
Reply to author
Forward
0 new messages