Random numbers were added because cache browser fonts are URL-based, then these random numbers are called every time you compile your codes and put them in your html, it loads the fonts again.
I have Visual Studio 2013 and compile my code with sass, and the result:
@font-face { font-family: "NexaBold"; src: font-files("nexa_bold-webfont.woff", "nexa_bold-webfont.ttf", "nexa_bold-webfont.svg", "nexa_bold-webfont.eot"); }
and here is my compass source for font-face mixin :
@mixin font-face( $name, $font-files, $eot: false, $weight: false, $style: false ) { $iefont: unquote("#{$eot}?#iefix"); @font-face { font-family: quote($name); @if $eot { src: font-url($eot); $font-files: font-url($iefont) unquote("format('eot')"), $font-files; } src: $font-files; @if $weight { font-weight: $weight; } @if $style { font-style: $style; } } }
if you look that my compass version does not add a random number to the end of the file path.
I myself suggest that you use font-face without a compass, use the following code:
@font-face { font-family: 'IranSans'; src: url('/css/fonts/IranSans.eot'); src: url('/css/fonts/IranSans.eot?#iefix') format('embedded-opentype'), url('/css/fonts/IranSans.woff') format('woff'), url('/css/fonts/IranSans.ttf') format('truetype'), url('/css/fonts/IranSans.svg') format('svg'); }
source share