diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2019-11-09 17:08:43 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2019-11-09 17:08:43 +0000 |
commit | 52805a78604f595d523f01bb5c1fa7abd5968c17 (patch) | |
tree | 34cda6d4450f9e2c6c87e1cad0992977f305d867 /content | |
parent | b15cbb72ac882cf820dd0db80238594a44f0ed00 (diff) | |
download | netsurf-52805a78604f595d523f01bb5c1fa7abd5968c17.tar.gz netsurf-52805a78604f595d523f01bb5c1fa7abd5968c17.tar.bz2 |
llcache: Allow file and resource schemes to be cached.
This means things like the default css file and adblock css file
are only loaded and parsed once.
Diffstat (limited to 'content')
-rw-r--r-- | content/llcache.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/content/llcache.c b/content/llcache.c index cd4066210..1e874800c 100644 --- a/content/llcache.c +++ b/content/llcache.c @@ -1792,7 +1792,7 @@ llcache_object_retrieve(nsurl *url, /* POST requests are never cached */ uncachable = true; } else { - /* only http and https schemes are cached */ + /* only http(s), resource, and file schemes are cached */ lwc_string *scheme; bool match; @@ -1800,13 +1800,17 @@ llcache_object_retrieve(nsurl *url, if (lwc_string_caseless_isequal(scheme, corestring_lwc_http, &match) == lwc_error_ok && + (match == false) && + lwc_string_caseless_isequal(scheme, corestring_lwc_https, + &match) == lwc_error_ok && + (match == false) && + lwc_string_caseless_isequal(scheme, corestring_lwc_resource, + &match) == lwc_error_ok && + (match == false) && + lwc_string_caseless_isequal(scheme, corestring_lwc_file, + &match) == lwc_error_ok && (match == false)) { - if (lwc_string_caseless_isequal(scheme, - corestring_lwc_https, &match) == - lwc_error_ok && - (match == false)) { - uncachable = true; - } + uncachable = true; } lwc_string_unref(scheme); } |