Closed ghwood closed 9 months ago
The problem seems to be introduced in https://github.com/ietf-tools/wagtail_website/commit/00eb01b: Django's {% spaceless %}
template tag removes whitespace between HTML tags, including adjacent links. There is an unmaintained package, django-smartspaceless, that claims to preserve whitespace between inline elements, but I'm not sure it's worth the hassle. Here are some numbers for the homepage response size:
Compression | original content | {% spaceless %} |
savings |
---|---|---|---|
none | 37093 | 24581 | 34% |
gzip | 5677 | 5090 | 10% |
brotli | 5662 | 5041 | 11% |
Since most people will be accessing the website through Cloudflare, with browsers that support transport compression, perhaps the easy fix of removing {% spaceless %}
is acceptable?
I have no objection to removing {% spaceless %}
. Our big content is not html.
See for example here: https://wwwstaging.ietf.org/blog/anrp-2023/