Closed Bug 1549460 Opened 5 years ago Closed 4 years ago

[meta] Network.setCacheDisabled

Categories

(Remote Protocol :: CDP, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ato, Unassigned)

References

()

Details

(Keywords: meta, Whiteboard: [method=Network.setCacheDisabled])

No description provided.
Blocks: puppeteer
Keywords: meta
Whiteboard: [method=Network.setCacheDisabled]

Seems to be used in Puppeteer for HTTP authentications. But I cannot find an instance of a call to authenticate() from inside the Gutenberg tests. It's not clear right now if it is needed or not for the alpha release. I won't add it for now as blocker.

Juggler uses the following code:

setCacheDisabled({cacheDisabled}) {
    const enable = Ci.nsIRequest.LOAD_NORMAL;
    const disable = Ci.nsIRequest.LOAD_BYPASS_CACHE |
                  Ci.nsIRequest.INHIBIT_CACHING;

    const docShell = this._frameTree.mainFrame().docShell();
    docShell.defaultLoadFlags = cacheDisabled ? disable : enable;
  }

I wonder if that persists navigation requests. Also what is the lifetime of the docshell? I assume until the unload?

Currently this missing API is causing a lot of Puppeteer unit tests to fail. I will have a look if we can get the above code from Juggler quickly implemented.

With bug 1607461 everything should have been implemented.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Component: CDP: Network → CDP
You need to log in before you can comment on or make changes to this bug.