How to cache reset css fonts

I changed my fonts on the server, but the browser received an old version of the css file where the fonts were typed, how to reset the cache ?, I tried to delete the browser cache and delete the old css file, but they still get the old cs, I tried to restart the server, like to fix it?

+5
source share
5 answers

I noticed that this only happens in Firefox, which is very annoying, however, if this is the same situation as you are here, update SHIFT + CMD + R (if you are on a Mac, I assume windows is an alternative to CTRL + SHIFT + R)

It will also clear your cache for this page + SHOULD show your fonts :)

+3
source

Do a: Ctrl + F5 in your browser

+1
source

, CSS , .

<link rel="stylesheet" type="text/css" href="/css/file.css?v=<?php echo rand(1000,10000) ?>">
0

, ?

CSS, CSS Ctrl + F5.

, , , !

0

, . , , Firefox, .

-: ? , , , .

:

@font-face{
    font-family: SuperFont;
    src: url('../fonts/Superfont.ttf'),
}

I copied this code somewhere, removing part of the definition src, not noticing the trailing comma that has made this line invalid. Therefore, the font was not loaded.

However, since I already installed Superfont locally, it seemed to work because the browser recognized it font-family. Well, until I decided to change the font file, but keeping the definition font-familyfor additional CSS file changes ...

Moral: When testing fonts, use a unique user name font-family.

0
source

All Articles