mirror of https://github.com/zulip/zulip.git
home: Add rel=dns-prefetch to Gravatar and any Zulip avatar host.
This hints to the browser that it should start DNS lookups for the host, since it is likely to be necessary. It is a softer form than `rel-preconnect`, which may be unnecessary in these cases, if the client has the resources cached already.
This commit is contained in:
parent
00dfb60f5b
commit
854ec40def
|
@ -8,6 +8,10 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block customhead %}
|
||||
{% if enable_gravatar %}<link rel="dns-prefetch" href="https://secure.gravatar.com" />
|
||||
{% endif -%}
|
||||
{% if s3_avatar_public_url_prefix %}<link rel="dns-prefetch" href="{{ s3_avatar_public_url_prefix }}" />
|
||||
{% endif -%}
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<link href="{{ static('images/logo/apple-touch-icon-precomposed.png') }}" rel="apple-touch-icon-precomposed" />
|
||||
<style>
|
||||
|
|
|
@ -241,6 +241,10 @@ def home_real(request: HttpRequest) -> HttpResponse:
|
|||
"page_params": page_params,
|
||||
"csp_nonce": csp_nonce,
|
||||
"color_scheme": user_permission_info.color_scheme,
|
||||
"enable_gravatar": settings.ENABLE_GRAVATAR,
|
||||
"s3_avatar_public_url_prefix": settings.S3_AVATAR_PUBLIC_URL_PREFIX
|
||||
if settings.LOCAL_UPLOADS_DIR is None
|
||||
else "",
|
||||
},
|
||||
)
|
||||
patch_cache_control(response, no_cache=True, no_store=True, must_revalidate=True)
|
||||
|
|
Loading…
Reference in New Issue