From 88666559f64bee9077d56293e1690b34ecc0bb1f Mon Sep 17 00:00:00 2001 From: Paul Adam Davis Date: Wed, 15 Apr 2015 10:44:01 +0100 Subject: [PATCH] Add version number to icon font src urls No issue To prevent browsers using an older version of the icon font when a newer version is available, we must add a version number to that src url. This number must be incremented when the file files change, so this also adds a note explaining that. --- assets/css/screen.css | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/assets/css/screen.css b/assets/css/screen.css index 6a3900e..95c5a5e 100644 --- a/assets/css/screen.css +++ b/assets/css/screen.css @@ -107,11 +107,11 @@ table { border-collapse: collapse; border-spacing: 0; } /* Import the font file with the icons in it */ @font-face { font-family: "casper-icons"; - src:url("../fonts/casper-icons.eot"); - src:url("../fonts/casper-icons.eot?#iefix") format("embedded-opentype"), - url("../fonts/casper-icons.woff") format("woff"), - url("../fonts/casper-icons.ttf") format("truetype"), - url("../fonts/casper-icons.svg#icons") format("svg"); + src:url("../fonts/casper-icons.eot?v=1"); + src:url("../fonts/casper-icons.eot?v=1#iefix") format("embedded-opentype"), + url("../fonts/casper-icons.woff?v=1") format("woff"), + url("../fonts/casper-icons.ttf?v=1") format("truetype"), + url("../fonts/casper-icons.svg?v=1#icons") format("svg"); font-weight: normal; font-style: normal; } @@ -164,6 +164,11 @@ table { border-collapse: collapse; border-spacing: 0; } .icon-menu:before { content: "\f609"; } +/* + IMPORTANT: When making any changes to the icon font, be sure to increment + the version number by 1 in the @font-face rule. `?v=1` becomes `?v=2` + This forces browsers to download the new font file. +*/ /* ==========================================================================