Bug 203107 - XMLHttpRequest should not prevent entering the back/forward cache
Summary: XMLHttpRequest should not prevent entering the back/forward cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 203106 203186
Blocks: 202293
  Show dependency treegraph
 
Reported: 2019-10-17 09:59 PDT by Chris Dumez
Modified: 2019-10-21 08:17 PDT (History)
5 users (show)

See Also:


Attachments
Patch (23.62 KB, patch)
2019-10-17 16:02 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (23.62 KB, patch)
2019-10-19 16:42 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (31.93 KB, patch)
2019-10-19 20:26 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-10-17 09:59:48 PDT
XMLHttpRequest should not prevent entering the back/forward cache.
Comment 1 Chris Dumez 2019-10-17 16:02:50 PDT
Created attachment 381245 [details]
Patch
Comment 2 Chris Dumez 2019-10-18 17:06:35 PDT
This is blocked on Bug 203106.
Comment 3 Chris Dumez 2019-10-19 16:42:17 PDT
Created attachment 381378 [details]
Patch
Comment 4 Radar WebKit Bug Importer 2019-10-19 16:44:05 PDT
<rdar://problem/56438647>
Comment 5 Chris Dumez 2019-10-19 20:26:46 PDT
Created attachment 381388 [details]
Patch
Comment 6 youenn fablet 2019-10-20 11:08:31 PDT
Comment on attachment 381388 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=381388&action=review

> Source/WebCore/ChangeLog:10
> +        1. We no longer cancel pending loads in the suspend() method as this may

This means we will continue loads even if the page navigates away.
If this is a large download or a load a la EventSource, we might spend some network resources for a suspended page.
Is this ok? Do you know what other browsers are doing?
Comment 7 Chris Dumez 2019-10-20 12:33:36 PDT
(In reply to youenn fablet from comment #6)
> Comment on attachment 381388 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=381388&action=review
> 
> > Source/WebCore/ChangeLog:10
> > +        1. We no longer cancel pending loads in the suspend() method as this may
> 
> This means we will continue loads even if the page navigates away.
> If this is a large download or a load a la EventSource, we might spend some
> network resources for a suspended page.
> Is this ok? Do you know what other browsers are doing?

No, all loads are cancelled when entering the page cache.
Comment 8 Chris Dumez 2019-10-20 12:37:24 PDT
Comment on attachment 381388 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=381388&action=review

>>> Source/WebCore/ChangeLog:10
>>> +        1. We no longer cancel pending loads in the suspend() method as this may
>> 
>> This means we will continue loads even if the page navigates away.
>> If this is a large download or a load a la EventSource, we might spend some network resources for a suspended page.
>> Is this ok? Do you know what other browsers are doing?
> 
> No, all loads are cancelled when entering the page cache.

We just don’t want to do it in the suspend() as it may fire events and we are not allowed to run script from inside suspend().
Comment 9 Chris Dumez 2019-10-21 08:17:25 PDT
Comment on attachment 381388 [details]
Patch

Clearing flags on attachment: 381388

Committed r251366: <https://trac.webkit.org/changeset/251366>
Comment 10 Chris Dumez 2019-10-21 08:17:27 PDT
All reviewed patches have been landed.  Closing bug.