mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
ui: js: Load all JS files in deferred mode to speed up page load
- This improves page rendering time. If JS files are not loaded in deferred or async mode, they will halt the page rendering until JS files are loaded from network. - 'defer' mode guarantees that the load order is same as the order in which JS files appeared in the HTML page. Tests: - Run at least one function of each affected JS file and ensure that is works. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
1 parent
ddd2d5b4a3
commit
c45bdf56dd
11 files changed
+48
-43
No files matched your search
@@ -6,6 +6,11 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
|
||||
{% block page_js %}
|
||||
<script type="text/javascript" src="{% static 'matrixsynapse/matrixsynapse.js' %}"
|
||||
defer></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block status %}
|
||||
{{ block.super }}
|
||||
|
||||
@@ -87,8 +92,3 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_js %}
|
||||
<script type="text/javascript"
|
||||
src="{% static 'matrixsynapse/matrixsynapse.js' %}"></script>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user