perf: add defer to scripts and lazy loading to images
Some checks failed
Some checks failed
Add defer attribute to 145 <script> tags across 103 template files (PERF-067) and loading="lazy" to 22 <img> tags across 13 template files (PERF-058). Both improve page load performance. Validator totals: 0 errors, 2 warnings, 1360 info (down from 1527). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -203,5 +203,5 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
<script src="{{ url_for('billing_static', path='admin/js/billing-history.js') }}"></script>
|
||||
<script defer src="{{ url_for('billing_static', path='admin/js/billing-history.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -474,5 +474,5 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
<script src="{{ url_for('billing_static', path='admin/js/subscription-tiers.js') }}"></script>
|
||||
<script defer src="{{ url_for('billing_static', path='admin/js/subscription-tiers.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -316,5 +316,5 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
<script src="{{ url_for('billing_static', path='admin/js/subscriptions.js') }}"></script>
|
||||
<script defer src="{{ url_for('billing_static', path='admin/js/subscriptions.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
{% block extra_head %}
|
||||
{# Stripe.js for payment #}
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
<script defer src="https://js.stripe.com/v3/"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
@@ -402,5 +402,5 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
<script src="/static/modules/billing/store/js/billing.js"></script>
|
||||
<script defer src="/static/modules/billing/store/js/billing.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user