Boris Zbarsky wrote:
> I don't believe 2.0.0.12 has the nsICachingChannel.LOAD_NO_NETWORK_IO flag.
> 
> LOAD_ONLY_FROM_CACHE should work, though.  I'm pretty surprised that it 
> doesn't....  Would you mind getting an HTTP log, following the 
> instructions at 
> <http://www.mozilla.org/projects/netlib/http/http-debugging.html>?

My apologies Boris.  It appears now after doing some more re-testing 
that the proper combination of flags I needed was this:

channel.loadFlags |= nsICachingChannel.LOAD_ONLY_FROM_CACHE | 
nsIRequest.VALIDATE_NEVER;

And yes, it works correctly as you had stated.  You are also correct 
that the LOAD_NO_NETWORK_IO flag doesn't appear to be working/supported 
in this FF version.  I think I somehow had an additional flag in my 
earlier tests that was causing the pull-from-cache-only behavior to not 
work as expected.  Must be the burnout factor.

Anyway, for the short term, if raw source is unavailable in cache, we 
may use a fallback approach of assembling the html source via the 
less-than-ideal approach of taking the results of a set of innerHTML 
calls against top-level child elements of the document object and 
getting it that way.  Its intended as a diagnostic feature anyway, and 
any information (constructed or otherwise) would be better than none.

Sorry for the misdirection there.  Happy to see it working now.
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to