Created
September 11, 2018 17:29
-
-
Save steveosoule/c794fb45a9b2fc747439de1e64bd015d to your computer and use it in GitHub Desktop.
Miva - CSS & JS Cache Busting with Modification Time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mvt:comment> | |
Style Sheet Cache Busting on Modification Time | |
</mvt:comment> | |
<mvt:assign name="l.settings:css_file:path" value="'/mm5/' g.theme_path $ '/css/pages.css'" /> | |
<mvt:assign name="l.settings:css_file:modified_time" value="stime( l.settings:css_file:path )" /> | |
<mvt:assign name="l.settings:css_file:path_with_cache_buster" value="l.settings:css_file:path $ '?v=' $ l.settings:css_file:modified_time" /> | |
<link rel="stylesheet" href="&mvt:css_file:path_with_cache_buster;"> | |
<mvt:comment> | |
JavaScript Cache Busting on Modification Time | |
</mvt:comment> | |
<mvt:assign name="l.settings:js_file:path" value="'/mm5/' g.theme_path $ '/js/scripts.js'" /> | |
<mvt:assign name="l.settings:js_file:modified_time" value="stime( l.settings:js_file:path )" /> | |
<mvt:assign name="l.settings:js_file:path_with_cache_buster" value="l.settings:js_file:path $ '?v=' $ l.settings:js_file:modified_time" /> | |
<script src="&mvt:js_file:path_with_cache_buster;"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment