Suffix in font path after "?" sign

201 views
Skip to first unread message

zard...@gmail.com

unread,
Sep 14, 2014, 5:44:30 PM9/14/14
to ico...@googlegroups.com
What is this suffix needed for? I mean the suffix after the font file name, "tmv6cp" in the example below:

@font-face {
font-family: 'myfont';
src:url('fonts/myfont.eot?tmv6cp');
src:url('fonts/myfont.eot?#iefixtmv6cp') format('embedded-opentype'),
url('fonts/myfont.woff?tmv6cp') format('woff'),
url('fonts/myfont.ttf?tmv6cp') format('truetype'),
url('fonts/myfont.svg?tmv6cp#myfont') format('svg');
font-weight: normal;
font-style: normal;
}

Why is it added? Can it be deleted? Why is it random each time I download the font?

Keyamoon

unread,
Sep 14, 2014, 10:09:25 PM9/14/14
to ico...@googlegroups.com
It is used for "cache busting". By adding it to the URL without actually changing the path to the file, we prevent the browser from loading a previously cached version of the file. Suppose you make your font and link to it. Later on, you decide to add a few glyphs to your font. If you don't change the URL, the browser might load the previous version of the font (cached locally) instead of fetching the new one from the server.
Message has been deleted

zard...@gmail.com

unread,
Sep 15, 2014, 4:26:40 PM9/15/14
to ico...@googlegroups.com
Thank you for your answer.

1. Is this string ("tmv6cp" in my example) saved somewhere inside the font files generated by Icomoon application? I mean: does the string in my CSS file have to match the string generated by Icomoon application? Or can I just manually replace "tmv6cp" with my custom randomly created string?

2. In case I don't need "cache busting", can I safely remove this string ("tmv6cp") from my CSS file?

Keyamoon

unread,
Sep 15, 2014, 9:26:48 PM9/15/14
to ico...@googlegroups.com
No, that string is simply a random string. It has not been saved anywhere. It is only there to change the URL without changing where it points to. You can remove or change it (together with the question mark). You can learn more about cache busting by looking it up on google.

pravin...@gmail.com

unread,
Aug 4, 2017, 7:37:11 AM8/4/17
to IcoMoon
Thanks helpful information
Reply all
Reply to author
Forward
0 new messages