Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Learn More

Do I need to load my fonts with every page of my website?

  • 7 odpowiedzi
  • 2 osoby mają ten problem
  • 6 wyświetleń
  • Ostatnia odpowiedź od ddetmar

more options

Hi,

In my website I use special fonts. To make sure that everyone, through every web-browser, sees my fonts correct I send my fonts with the website pages to the user´s browser. The question is: Do I need to do this for every page the user visits or only together with the first page? Because in my opinion the fonts will reside in the user´s browser cache, at least till the end of the session. I ask you this because I want to serve my pages as fast as possible.

Thanks, Dirk Detmar (I am Dutch) Teresina, Piaui, Brazil

Hi, In my website I use special fonts. To make sure that everyone, through every web-browser, sees my fonts correct I send my fonts with the website pages to the user´s browser. The question is: Do I need to do this for every page the user visits or only together with the first page? Because in my opinion the fonts will reside in the user´s browser cache, at least till the end of the session. I ask you this because I want to serve my pages as fast as possible. Thanks, Dirk Detmar (I am Dutch) Teresina, Piaui, Brazil

Wybrane rozwiązanie

Hi Jscher,

With every answer I get closer to the "Pot with Gold". I understand that there is no simple answer possible for this question of mine. Thanks to you there are some roads ahead now for me to explore further, I will do that.

For me the case is closed now. Thank you so much for helping me to get a broader view and a better insight in the working of the internet technology.

Thanks, Dirk

Przeczytaj tę odpowiedź w całym kontekście 👍 0

Wszystkie odpowiedzi (7)

more options

Usually you would serve a single downloadable font file (e.g., myfont.woff) and Firefox will indeed cache that.

To see whether Firefox is using a File from cache or is downloading it again and again, you can try using the Web Console (Ctrl+Shift+k), Network tab. The status code in the left column indicates how Firefox sourced the file. For example, 200 is a full retrieve, and 304 was re-used from cache after checking for a possible update. If a file you know was loaded into the page is not listed at all, then Firefox used the cached file without checking for an update (for example, if it was very fresh).

(Example screen shot attached.)

more options

When you're ready, you can post a link to your site for additional comments, or try a more developer-oriented forum such as: http://forums.mozillazine.org/viewforum.php?f=25

more options

Hi Jscher, Your reply was very informative. However I got code 200 for the retrieval of the fonts every time. The first time many ms´s, the second and the following call however used only a couple of ms´s. Conclusion, the code is the same but the download time is very much less !!! Incredible! I will make a test run with only one call in the first page and that´s all. I will see the result in the 10 calls thereafter. When the fonts render well, I will have my answer, if not I have a good answer too.

Thanks so much. When you have additional suggestions, please.

Regards, Dirk Detmar

more options

If you use the first tab of the Web Console and click the URL corresponding to the font file, then scroll the pop-up to view the Response headers, can you see anything that would discourage Firefox from caching it, such as no-store, an "expires" date in the past, etc.?

more options

Your answer helped me a lot. Thanks "Jscher2000"!

Now I still have my initial question and a new one too. The old one: When the expiration date would be a future date? Is it then possible to load the fonts only in the beginning of the browser session? The new question: How can I put an expiration date in the future?

Regards, Dirk

more options

Hi Dirk, the details depend on your web server and your hosting arrangements. For example, if you are using WordPress, there are plugins that can help optimize page loading speed and caching.

more options

Wybrane rozwiązanie

Hi Jscher,

With every answer I get closer to the "Pot with Gold". I understand that there is no simple answer possible for this question of mine. Thanks to you there are some roads ahead now for me to explore further, I will do that.

For me the case is closed now. Thank you so much for helping me to get a broader view and a better insight in the working of the internet technology.

Thanks, Dirk