问题描述:

Basically I need to load specific font load with lesser loading time on website. I am using @font-face to add the specific font on my site. It works well, but it is consuming lots of time to load on site.

At loading time, the website's content is shown without conversion (in coded language), which is not good for the site's security.

Any idea to load it with lesser loading time?

网友答案:
  1. Load the stylesheet at the head of your document. That way, it's parsed first.
  2. Reduce the characters/glyphs of your font to lessen the size. If you just do English, there's no need to load the additional foreign characters.
  3. Use a CDN. This can also apply to images, stylesheets and scripts.
  4. Fonts can be embedded to the CSS as Base64. The stylesheet will be larger, but will reduce HTTP requests.
  5. Most importantly, cache your resources. If they are not going to change it any time in the near future, consider setting the right headers to cache it forever.
相关阅读:
Top