mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 08:11:08 -05:00
Update scripts and add cache control to improve site stability
Updates script loading order for Alpine.js, adds versioning to static assets, and implements cache control meta tags to prevent 500 errors related to stale content. Replit-Commit-Author: Agent Replit-Commit-Session-Id: eff39de1-3afa-446d-a965-acaf61837fc7 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/d6d61dac-164d-45dd-929f-7dcdfd771b64/eff39de1-3afa-446d-a965-acaf61837fc7/wS1rD01
This commit is contained in:
2
.replit
2
.replit
@@ -36,7 +36,7 @@ localPort = 5000
|
|||||||
externalPort = 80
|
externalPort = 80
|
||||||
|
|
||||||
[[ports]]
|
[[ports]]
|
||||||
localPort = 32787
|
localPort = 37519
|
||||||
externalPort = 3000
|
externalPort = 3000
|
||||||
|
|
||||||
[deployment]
|
[deployment]
|
||||||
|
|||||||
@@ -30,14 +30,14 @@
|
|||||||
<!-- HTMX -->
|
<!-- HTMX -->
|
||||||
<script src="https://unpkg.com/htmx.org@1.9.6"></script>
|
<script src="https://unpkg.com/htmx.org@1.9.6"></script>
|
||||||
|
|
||||||
<!-- Alpine.js -->
|
<!-- Alpine.js Components (must load before Alpine.js) -->
|
||||||
<script defer src="{% static 'js/alpine.min.js' %}"></script>
|
<script defer src="{% static 'js/alpine-components.js' %}?v={{ version|default:'1.0' }}"></script>
|
||||||
|
|
||||||
<!-- Alpine.js Components -->
|
<!-- Alpine.js -->
|
||||||
<script src="{% static 'js/alpine-components.js' %}"></script>
|
<script defer src="{% static 'js/alpine.min.js' %}?v={{ version|default:'1.0' }}"></script>
|
||||||
|
|
||||||
<!-- Location Autocomplete -->
|
<!-- Location Autocomplete -->
|
||||||
<script src="{% static 'js/location-autocomplete.js' %}"></script>
|
<script defer src="{% static 'js/location-autocomplete.js' %}?v={{ version|default:'1.0' }}"></script>
|
||||||
|
|
||||||
<!-- Tailwind CSS -->
|
<!-- Tailwind CSS -->
|
||||||
<link href="{% static 'css/tailwind.css' %}" rel="stylesheet" />
|
<link href="{% static 'css/tailwind.css' %}" rel="stylesheet" />
|
||||||
@@ -133,9 +133,14 @@
|
|||||||
<!-- Global Toast Container -->
|
<!-- Global Toast Container -->
|
||||||
{% include 'components/ui/toast-container.html' %}
|
{% include 'components/ui/toast-container.html' %}
|
||||||
|
|
||||||
<!-- Custom JavaScript -->
|
<!-- Custom JavaScript with cache control -->
|
||||||
<script src="{% static 'js/main.js' %}"></script>
|
<script src="{% static 'js/main.js' %}?v={{ version|default:'1.0' }}"></script>
|
||||||
<script src="{% static 'js/alerts.js' %}"></script>
|
<script src="{% static 'js/alerts.js' %}?v={{ version|default:'1.0' }}"></script>
|
||||||
|
|
||||||
|
<!-- Cache control meta tag -->
|
||||||
|
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||||
|
<meta http-equiv="Pragma" content="no-cache">
|
||||||
|
<meta http-equiv="Expires" content="0">
|
||||||
{% block extra_js %}{% endblock %}
|
{% block extra_js %}{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user