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.
This commit is contained in:
Paul Adam Davis 2015-04-15 10:44:01 +01:00
parent c94651d8fb
commit 88666559f6

View file

@ -107,11 +107,11 @@ table { border-collapse: collapse; border-spacing: 0; }
/* Import the font file with the icons in it */ /* Import the font file with the icons in it */
@font-face { @font-face {
font-family: "casper-icons"; font-family: "casper-icons";
src:url("../fonts/casper-icons.eot"); src:url("../fonts/casper-icons.eot?v=1");
src:url("../fonts/casper-icons.eot?#iefix") format("embedded-opentype"), src:url("../fonts/casper-icons.eot?v=1#iefix") format("embedded-opentype"),
url("../fonts/casper-icons.woff") format("woff"), url("../fonts/casper-icons.woff?v=1") format("woff"),
url("../fonts/casper-icons.ttf") format("truetype"), url("../fonts/casper-icons.ttf?v=1") format("truetype"),
url("../fonts/casper-icons.svg#icons") format("svg"); url("../fonts/casper-icons.svg?v=1#icons") format("svg");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@ -164,6 +164,11 @@ table { border-collapse: collapse; border-spacing: 0; }
.icon-menu:before { .icon-menu:before {
content: "\f609"; 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.
*/
/* ========================================================================== /* ==========================================================================