3 Commits
Author SHA1 Message Date
UbuntuandClaude Opus 5.5 4c79619e7d Self-host moment.js so the booking worker list loads again
All four head templates hot-linked moment from momentjs.com/downloads,
which is the project website rather than a CDN. Since that file was
replaced on 2026-10-29, Chrome intermittently blocks it with
ERR_BLOCKED_BY_ORB on uncached loads. The booking form's ready handler
then dies on "moment is not defined" before binding the service click
handler, so no worker request is ever sent and the worker picker stays
empty - on test, dev and prod at once.

moment 2.30.1 (cdnjs build) is now served from assets/js through
asset_ver(). Only moment.utc().add().format() is used, so the pin
is safe.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-17 08:19:01 +00:00
UbuntuandClaude Opus 5 7f51a795a5 Cache-bust local css/js so a deploy is picked up immediately
Apache serves this site's static files with only Last-Modified/ETag and no
Cache-Control or Expires, so browsers apply heuristic freshness and can hold
a stale stylesheet for hours. Deploys here are a file copy, so nothing else
signals a change. During development this masked CSS edits three separate
times; on the live site a returning customer would keep the old stylesheet
after a deploy with no way to know.

Adds asset_ver() (autoloaded), which returns the asset URL with the file's
mtime appended, so the URL itself changes whenever the file does. Falls back
to the plain URL when the file is missing, so a bad path degrades to the
previous behaviour rather than warning.

All 54 local css/js links now route through it, across the four *-head.php
and four *-skeleton-bottom.php includes.

Notes
- Remote assets are deliberately untouched: Google Fonts, momentjs,
  cookieyes and the googleapis jQuery keep their own URLs. Only files inside
  the webroot are versioned.
- vertical-head.php has one dynamic path (assets/css/<?= $vertical['css'] ?>)
  which is special-cased; a generic rewrite would swallow the nested <?php.
- Images are NOT versioned. Replacing an image under the same filename can
  still serve stale.
- head.php is shared by the public home page and the whole admin portal;
  /login verified to still render with versioned CSS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 09:00:40 +00:00
Astral04 68c8245cef add all files 2025-10-04 11:38:07 +02:00