From 2e2880bb5d1bb0b669d79242a8dd4bde5f441f47 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 24 May 2021 08:35:09 +0200 Subject: [PATCH] Rel excludes --- app/src/main/java/eu/faircode/email/ContactInfo.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ContactInfo.java b/app/src/main/java/eu/faircode/email/ContactInfo.java index 2ff73005fa..3ab2b0b961 100644 --- a/app/src/main/java/eu/faircode/email/ContactInfo.java +++ b/app/src/main/java/eu/faircode/email/ContactInfo.java @@ -111,8 +111,10 @@ public class ContactInfo { private static final long CACHE_GRAVATAR_DURATION = 2 * 60 * 60 * 1000L; // milliseconds private static final long CACHE_FAVICON_DURATION = 2 * 7 * 24 * 60 * 60 * 1000L; // milliseconds + // https://css-tricks.com/prefetching-preloading-prebrowsing/ + // https://developer.mozilla.org/en-US/docs/Web/Performance/dns-prefetch private static final List REL_EXCLUDE = Collections.unmodifiableList(Arrays.asList( - "dns-prefetch", "preconnect", "prefetch", "preload", "prerender" + "dns-prefetch", "preconnect", "prefetch", "preload", "prerender", "subresource" )); private ContactInfo() { @@ -554,7 +556,6 @@ public class ContactInfo { List> futures = new ArrayList<>(); for (Element img : imgs) { - // https://developer.mozilla.org/en-US/docs/Web/Performance/dns-prefetch String rel = img.attr("rel").trim().toLowerCase(Locale.ROOT); if (REL_EXCLUDE.contains(rel)) // dns-prefetch: gmx.net continue;