New issue
Advanced search Search tips

Issue 638198 link

Starred by 16 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 627231



Sign in to add a comment

Annoying user experience on back navigation due to dummy fast-forwarding history entries

Project Member Reported by kenjibaheux@chromium.org, Aug 16 2016

Issue description

We've observed websites abusing (or misusing) History.

Typically, the History get stuffed with multiple dummy entries that fast-forward the user back to the page they wanted to leave.

Getting back to the desired history entry is extremely hard. 

Because of the instant fast-fowarding nature of the dummy history entries, the user can't wait for a visual confirmation to know when to stop hitting the back button. As a result, the user either overshoot or undershoot its destination resulting in guaranteed frustration.
 
Components: Blink>Loader
Labels: Hotlist-Interventions
WICG issue: https://github.com/WICG/interventions/issues/21
Blocking: 627231
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5018fe68a2028eace50ee5bad30cc6c688685757

commit 5018fe68a2028eace50ee5bad30cc6c688685757
Author: japhet <japhet@chromium.org>
Date: Wed Sep 14 19:14:04 2016

Add a flag to require a user gesture to add an entry to the back/forward list.

Can be enabled in about://flags

BUG=638198

Review-Url: https://codereview.chromium.org/2323563002
Cr-Commit-Position: refs/heads/master@{#418635}

[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/chrome/app/generated_resources.grd
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/chrome/browser/about_flags.cc
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/content/browser/renderer_host/render_view_host_impl.cc
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/content/public/common/common_param_traits_macros.h
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/content/public/common/content_switches.cc
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/content/public/common/content_switches.h
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/content/public/common/web_preferences.cc
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/content/public/common/web_preferences.h
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/content/renderer/render_view_impl.cc
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/third_party/WebKit/Source/core/frame/Settings.in
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/third_party/WebKit/Source/core/loader/FrameLoader.cpp
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/third_party/WebKit/Source/web/WebSettingsImpl.cpp
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/third_party/WebKit/Source/web/WebSettingsImpl.h
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/third_party/WebKit/public/web/WebSettings.h
[modify] https://crrev.com/5018fe68a2028eace50ee5bad30cc6c688685757/tools/metrics/histograms/histograms.xml

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a9d9d9333295c2b73567e4256cd68abe5481380

commit 5a9d9d9333295c2b73567e4256cd68abe5481380
Author: japhet <japhet@chromium.org>
Date: Wed Apr 05 19:09:22 2017

When historyEntryRequiresUserGesture is enabled, exempt docs that have been committed for 5 seconds

Also, add a test for historyEntryRequiresUserGesture flag.

BUG=638198
TEST=http/tests/history/history-entry-requires-user-gesture.html

Review-Url: https://codereview.chromium.org/2780953002
Cr-Commit-Position: refs/heads/master@{#462166}

[add] https://crrev.com/5a9d9d9333295c2b73567e4256cd68abe5481380/third_party/WebKit/LayoutTests/http/tests/history/history-entry-requires-user-gesture-expected.txt
[add] https://crrev.com/5a9d9d9333295c2b73567e4256cd68abe5481380/third_party/WebKit/LayoutTests/http/tests/history/history-entry-requires-user-gesture.html
[add] https://crrev.com/5a9d9d9333295c2b73567e4256cd68abe5481380/third_party/WebKit/LayoutTests/http/tests/history/resources/navigation-with-user-gesture.html
[modify] https://crrev.com/5a9d9d9333295c2b73567e4256cd68abe5481380/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/5a9d9d9333295c2b73567e4256cd68abe5481380/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/5a9d9d9333295c2b73567e4256cd68abe5481380/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
[modify] https://crrev.com/5a9d9d9333295c2b73567e4256cd68abe5481380/third_party/WebKit/Source/core/loader/FrameLoader.cpp

What's the status of this?
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d6cca051071798d07a8c7a9360e89a8636e9047f

commit d6cca051071798d07a8c7a9360e89a8636e9047f
Author: Nate Chapin <japhet@chromium.org>
Date: Sun Oct 15 03:47:32 2017

Fix UseCounter for history-entry-requires-user-gesture experiment

It's only counting when enabled. Ideally we'd like to know when it would be
triggered, whether or not the experiment is enabled.

Bug: 638198
Change-Id: Ib9dddd38f57816b75a8494b17f2482a92bc9023f
Reviewed-on: https://chromium-review.googlesource.com/717416
Commit-Queue: Ojan Vafai <ojan@chromium.org>
Reviewed-by: Ojan Vafai <ojan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508948}
[modify] https://crrev.com/d6cca051071798d07a8c7a9360e89a8636e9047f/third_party/WebKit/Source/core/dom/Document.cpp

Comment 8 by ojan@chromium.org, Jan 6 2018

Cc: ojan@chromium.org
 Issue 624783  has been merged into this issue.

Comment 9 by atotic@chromium.org, Mar 26 2018

An alternate proposal to accomplish the same goal:

- let history entries be created as they are today. Store a "user_navigation" flag with each entry that is true if navigation was triggered by user gesture.

- have back/forward buttons skip all entries where user_navigation == false

This proposal minimizes compatibility risk, and is simple to implement. History remains the same. User can navigate to all entries via dropdown history menus. Only thing that changes is that back/forward buttons skipover non user_navigation entries.

Comment 10 by ojan@chromium.org, Mar 26 2018

What happens in that proposal when you call history.back()? IMO, it's important that history.back and the back button in the browser do the same thing. At which point, what do you gain from having the user_navigation==false entries in the back history?
Project Member

Comment 11 by bugdroid1@chromium.org, Sep 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b1d506ebcf3049c84cda4d5617dbf2ca151c68db

commit b1d506ebcf3049c84cda4d5617dbf2ca151c68db
Author: Charlie Harrison <csharrison@chromium.org>
Date: Mon Sep 24 16:53:12 2018

Add kSuppressHistoryEntryWithoutUserGesture to ukm_features

This is set for ~3% of PageVisits.

Bug: 638198
Change-Id: Ib6c3d10565f2776aadbabea1a2d4d1363f2a6f9d
Reviewed-on: https://chromium-review.googlesource.com/1240166
Reviewed-by: Bryan McQuade <bmcquade@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593570}
[modify] https://crrev.com/b1d506ebcf3049c84cda4d5617dbf2ca151c68db/chrome/browser/page_load_metrics/observers/use_counter/ukm_features.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Oct 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e4e144c22efca57dac9854b67fc4b41404ffc533

commit e4e144c22efca57dac9854b67fc4b41404ffc533
Author: Shivani Sharma <shivanisha@chromium.org>
Date: Mon Oct 08 19:03:40 2018

Test for verifying history-entry-requires-user-gesture flag for pushState.

http/tests/history/history-entry-requires-user-gesture-push-state.html

Bug: 638198
Test: python third_party/blink/tools/run_web_tests.py -t Default
Change-Id: I5578749bab0da626f02e981523fb4a813be6ef98
Reviewed-on: https://chromium-review.googlesource.com/c/1251332
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Shivani Sharma <shivanisha@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597635}
[add] https://crrev.com/e4e144c22efca57dac9854b67fc4b41404ffc533/third_party/WebKit/LayoutTests/http/tests/history/history-entry-requires-user-gesture-push-state-expected.txt
[add] https://crrev.com/e4e144c22efca57dac9854b67fc4b41404ffc533/third_party/WebKit/LayoutTests/http/tests/history/history-entry-requires-user-gesture-push-state.html

Sign in to add a comment