MIDORI_VERSION_SUFFIX resolves to a string that needs to be
added to each extension's version at build time. If it is
different than the running Midori's, it is shown in the
extension list.
The web cache extension is automatically hidden/ disabled if
WebKitGTK+ is new enough, the new cache is a core feature.
By default 100 MB of pages can be cached on disk.
The 'Applications' preference tab is resurrected.
The same folder ~/.cache/midori/web is used for old and new cache.
The new function allows registering callbacks which clear data,
with a name and label so they show up in the Clear Private Data
dialogue and the chosen items are saved.
The old enumeration still keeps history, trash and the flag
whether to clear when Midori quits.
Iterating an array by a GList is considerably faster than
continuously retrieving items, however it is also a lot
more complicated. So the new macro takes care of that and
uses a new semi-private function to avoid copying the list.
Note that the macro can't be nested, which basically isn't
useful in practise anyway.
1. We are now reading from the cache asyncronously. Fixing UI freezes.
2. Cache writing switched to GOutputStream. One open/ close per file
3. Plugged a leak of cache headers in web_cache_message_rewrite ()
4. We don't need the URI in web_cache_mesage_got_headers_cb ()
When the web cache folder is deleted, the filenames passed to callbacks
may not be updated, so trying to write headers results in a crash.
We need to make sure we only write after opening the file properly.
Using g_access instead of g_file_test is a lot faster and avoids
big delays when accessing the disk.
Using only the SoupSession without resource-request-starting simplifies
the code. So offline mode is not an option for the moment.
Pass filenames directly to speed up lookups.
With WebKit 1.1.11 and newer, we can sniff the content type which
is needed in some cases to load for instance Flash videos.
We are writing chunks into temporary files and commit completed
files to the cache, so that we don't end up serving partial files.
Old cache entries are removed before updating.
Length detection is improved.
File creation moved from got-chunk to got-headers.
At this point libsoup is dependent on a functional network adapter,
which may not be available if no network connection is there or
the connection is faulty. So *if* we have a requested page in the
cache, we load it before libsoup comes into play.
Depending on the WebKitGTK+ version, loading from cache uses an
"alternate" URI so that we don't end up having cache filenames
in the location entry.
Generation of cache filenames is fixed to never include special
characters such as slashes or question marks.
Only non-empty files are actually stored to the cache folder.
Incoming files are cached and saved to disk, as well as looked up
when files are requested. Only images are considered at the moment
and there is no epxiration handling or updating at all. Plus
it crashes in certain cases.