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>
15 lines
601 B
PHP
Executable File
15 lines
601 B
PHP
Executable File
|
|
<?php
|
|
include(getcwd().'/application/views/includes/barber-footer.php');
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="<?php echo asset_ver('assets/js/jquery.dropotron.min.js');?>"></script>
|
|
<script src="<?php echo asset_ver('assets/js/browser.min.js');?>"></script>
|
|
<script src="<?php echo asset_ver('assets/js/breakpoints.min.js');?>"></script>
|
|
<script src="<?php echo asset_ver('assets/js/util.js');?>"></script>
|
|
<script src="<?php echo asset_ver('assets/js/studiobave.js');?>"></script>
|
|
</body>
|
|
</html>
|