ResourceManager is a tool for monitoring, modifying, and creating network activity.
- Resource IDs: a resource is essentially what a URL points to. For each unique URL, there is at least one unique resource ID. Resources are kept alive as long as something is using them. Note that ResourceManager does not retain resources; Opera may free resources if they are not used anywhere. An OnUrlUnload event will be sent in this case.
- Request IDs: represents HTTP requests. The purpose of these IDs is to make it possible to match related request/response events together.
External ID fields
- Window IDs are the same in all services, and can be used interchangeably everywhere. See WindowManager for window-centric commands and events.
- Frame IDs are described in DocumentManager.
- Document IDs are also described in DocumentManager.
Add one or more overrides for HTTP headers. An override can be either adding a new header, overwriting an existing one, or removing it completely (if present).
Clear cached resources, or as many of the resources as possible. (Resources currently in use will not be cleared).
Remove all overrides previously added with AddHeaderOverride.
Create a HTTP request from scratch. It is possible to let Opera choose some common headers, or control everything by hand.
Get ResourceData for a certain resource.
This command provides a way to get data from a resource after the request has completed, or in cases where there is no request.
It is possible to get the resource with a different content mode than what has been set by SetResponseMode.
Remove overrides previously added with AddHeaderOverrides.
Choose whether resources should be allowed to load from cache, or whether they should be fully downloaded over the network on each reload.
The default mode is to always load resources fully.
Choose how (and if) request data should be reported. It's possible to set a filter with different settings based on MIME type.
Choose how (and if) response data should be reported. It's possible to set a filter with different settings based on MIME type.
Fired when a request is created.
Fired after the entire request (including payload, if any) has been sent.
Fired after the request headers are composed.
If pipelining is enabled, a request can sometimes be moved to another connection if the previous connection failed, for some reason.
In these cases, this event will fire to indicate that we are retrying the same request under a new requestID.
Fired when data is first received from the server, before any headers are parsed.
Fired when the entire response (including payload) has been downloaded.
Fired when headers are received and parsed.
Resource was completely loaded or failed.
No request events should happen after this point.
A resource was requested by the browser.
Depending on the protocol used it may result in OnRequest/OnResponse events. When resource is loaded OnUrlFinished is sent.
Sent when a URL is redirect to another URL. Contains both the original resource ID and the new resource ID.
The specified URL and resource ID is no longer in use in the browser. Any references to them should be removed.
Trying to use the resource ID after this event will not work.