Fix add-to-cart: bust main.js SW cache, add inline onclick to shop buttons

Service worker was caching main.js (cache-first strategy) so event listeners
may not have been running. Added filemtime version param to main.js like CSS.
Also added inline onclick to shop page buttons so they work regardless of
whether event delegation is functional.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-14 20:11:35 +00:00
parent e389254a7c
commit 6e86031576
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -71,7 +71,7 @@
</div>
</footer>
<script src="/assets/js/main.js"></script>
<script src="/assets/js/main.js?v=<?= filemtime($_SERVER['DOCUMENT_ROOT'] . '/assets/js/main.js') ?>"></script>
<!-- PWA Service Worker Registration -->
<script>