The following warnings occurred: | ||||||||||||||||||||||||||||||
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
|
Make version query parameter optional - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Feature Requests (http://get-simple.info/forums/forumdisplay.php?fid=7) +--- Thread: Make version query parameter optional (/showthread.php?tid=10551) |
Make version query parameter optional - beejay41 - 2018-07-06 When registering a Stylesheet or Script (register_style, register_script functions), can the "v=" query string be omitted from the generated html if the version parameter is blank or otherwise not provided? Apparently, while successfully cache busting, it can block caching completely: http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/ I prefer automatically embedding the file date into the name, then use .htaccess to remove it when requested as per html5-boilerplate's and others advice. This can be be done conveniently with a small .htaccess file in the template folder. Example from my template functions.php: Code: register_style(TEMPLATE . '.site', self::autoVer($theme_url . '/css/theme.min.css'), '', 'all'); Code: <link href="/theme/mytheme.2018/css/theme.min.1527149955.css?v=" rel="stylesheet" media="all"> The "?v=" is not useful. RE: Make version query parameter optional - shawn_a - 2018-07-06 This is already the case in 3.4 |