Skip to content

Commit

Permalink
feat(core): defer external scripts
Browse files Browse the repository at this point in the history
Set defer attribute on script tags for external
scripts.
  • Loading branch information
koeaw committed Oct 9, 2024
1 parent 16ee4a4 commit 47690ee
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions apis_core/core/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,26 @@
{% endblock styles %}

{% block scriptHeader %}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"
defer></script>
{# Bootstrap 4.6.2 bundle (without jQuery) #}
{# see https://getbootstrap.com/docs/4.6/getting-started/introduction/ #}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/js/bootstrap-multiselect.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.4/leaflet.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.full.min.js"></script>
crossorigin="anonymous"
defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/js/bootstrap-multiselect.min.js"
defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.4/leaflet.js"
defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.full.min.js"
defer></script>
<script src="https://unpkg.com/[email protected]"
integrity="sha384-D1Kt99CQMDuVetoL1lrYwg5t+9QdHe7NLX/SoJYkXDFfX37iInKRy5xLSi8nO7UC"
crossorigin="anonymous"></script>
<script src="{% static "js/core.js" %}"></script>
<script src="{% static 'js/E53_Place_popover.js' %}"></script>
crossorigin="anonymous"
defer></script>
<script src="{% static "js/core.js" %}" defer></script>
<script src="{% static 'js/E53_Place_popover.js' %}" defer></script>
{% endblock %}

</head>
Expand Down

0 comments on commit 47690ee

Please sign in to comment.