Add LOAD_FLAGS_REPLACE_HISTORY to GeckoSession LoadFlags
Categories
(GeckoView :: General, enhancement)
Tracking
(firefox69 wontfix, firefox70 fixed)
People
(Reporter: rbarker, Assigned: rbarker)
References
Details
Attachments
(1 file)
In Fennec, LOAD_FLAGS_BYPASS_CACHE
and LOAD_FLAGS_REPLACE_HISTORY
are used when switching to and from desktop mode as seen in the code snippet:
// We need LOAD_FLAGS_BYPASS_CACHE here since we're changing the User-Agent
// string, and servers typically don't use the Vary: User-Agent header, so
// not doing this means that we'd get some of the previously cached content.
let loadFlags =
Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE |
Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY;
In order for applications embedding GeckoView to provide this same functionality, the two flags need to be added to GeckoSession
LoadFlags
.
Comment 1•5 years ago
|
||
LOAD_FLAGS_BYPASS_CACHE
is also required for force-refreshing a page (long press the refresh button in Fennec).
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Found that LOAD_FLAGS_BYPASS_CACHE
was already supported by GV. Changed the title to reflect that.
Comment 3•5 years ago
|
||
Might it be also worth adding a convenience overload of GeckoSession.reload()
that also accepts some load flags?
Assignee | ||
Comment 4•5 years ago
|
||
Bug 1571088 - Add LOAD_FLAGS_REPLACE_HISTORY to GeckoSession LoadFlags
Assignee | ||
Updated•5 years ago
|
Pushed by rbarker@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0c2607dd7f5b Add LOAD_FLAGS_REPLACE_HISTORY to GeckoSession LoadFlags r=geckoview-reviewers,snorp,droeh
Comment 6•5 years ago
|
||
bugherder |
Comment 7•5 years ago
|
||
Fenix will need this flag to make desktop UA work in https://github.com/mozilla-mobile/fenix/issues/3903. The Fenix bug is a P3 so we don't need to bother uplifting this fix to GV 69 Beta. It can ride in GV 70.
Description
•