Patch: improved offline browsing, rev 2

MG maps4711 at gmx.de
Thu Mar 4 14:03:53 GMT 2004


> Do these sites work though if the contents of a requested dynamic url is in
> the http-cache?

It works for me :-) If the contents behind some URL is marked dynamic with 
some "no-cache" HTTP field, the cache entry is marked as 
should-not-have-been-cached. In non-offline mode this results in a http 
request for such URLs and overwrites the previous contents of the cache file.

You question made me look over my changes :-) I found some small things to fix 
and clean up. I attached a new patch.

> BTW, the lines
> 	if (queryMetaData("cache") != "reload")
> 	    addMetaData("cache","refresh");
> are in the code in order to prevent redirects from being cached.

As outlined below, my patch takes care for redirections. The metadata changes 
interfere with offline browsing, so I had to remove them.

>
> Regarding redirects: you've changed the code structure for redirection
> handling. Does it behave correctly? Will requests that had been answered
> with a redirect be re-issued, unless the system is in offline browsing
> mode?

Yes. From http.cc:4666:

        // use only cache for redirections if cache policy is "use cache"
        if (!m_request.redir.isEmpty() && (m_request.cache != CC_CacheOnly)) {
            DCCE << " reload of redirection" << endl;
            keepCacheFile = true;
            ok = false;
        }

Matthias


-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-3.2.0-offline-minimal_2.diff
Type: text/x-diff
Size: 36272 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20040304/7cfa8e2b/attachment.diff>


More information about the kfm-devel mailing list