[webkit-dev] Disable network resources

Patrick Hanna phanna at email.unc.edu
Mon Feb 22 09:17:07 PST 2010

I would like to turn off network resources when loading a page. This  
is going to be used mainly for loading data using SubstituteData from  
the file system. The desired behavior would be to toggle a setting to  
turn on and off network resources similar to auto loading images. I  
haven't found a built-in way to do this in any of the loader classes.  
Is there currently a way to do this or do I need to write my own?

Here is what I have tried:
Loader::suspendPendingRequests() -- causes the progress to never  
finish and it looks like this is used by ContainerNode and probably  
isn't the right answer.

ResourceLoaderClient::didFail() -- calling this on network requests  
works but does not allow me to re-request resources once I want to  
unblock the network (at least I could not figure out how)

Modify DocLoader/CachedResource -- works great but I don't want to  
rewrite what someone else has already done.


More information about the webkit-dev mailing list