mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-03-12 01:53:09 +03:00
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.
This commit is contained in:
parent
b15cbb72ac
commit
52805a7860
@ -1792,21 +1792,25 @@ 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;
|
||||
|
||||
scheme = nsurl_get_component(defragmented_url, NSURL_SCHEME);
|
||||
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user