Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "use.typekit.net" doing in the header of a page?

I am looking at this page.

I can see this in the header. Can someone explain what it does. I can't see any mention of it and what it is used for:

  <script class="js-allow-in-head" src="//use.typekit.net/txx2jfv.js"></script>
  <script class="js-allow-in-head">try{Typekit.load();}catch(e){}</script>

thanks

like image 510
Samantha J T Star Avatar asked Nov 19 '14 06:11

Samantha J T Star


People also ask

What is typekit net used for?

Typekit is Adobe's hosted web font service. The CSS or JavaScript file which loads the web fonts and the web font files themselves are added to your website in the browser from our content delivery network (CDN), use.typekit.net.

What is typekit JavaScript?

The Typekit API gives you programmatic access to the functionality of Typekit over a RESTful HTTP based API. It allows you to programmatically create, modify and publish kits, and fetch metadata about all the fonts in the Typekit library.


2 Answers

Typekit is a provider of webfonts. They probably are the only service that benefits from having the script in the head, because it blocks rendering while the fonts download, thus preventing a FOUT (flash of unstyled text)

The script works by fetching some css files that contain the fonts in base64 encoding.

like image 154
Jon Snow Avatar answered Oct 19 '22 23:10

Jon Snow


//use.typekit.net/txx2jfv.js is the script including in the header of page..this file contain some jquery code...The use of that code is to use beautiful FONTS on your page...check the site https://typekit.com/

like image 40
Ankit Chugh Avatar answered Oct 19 '22 22:10

Ankit Chugh