
Javascript enthusiast | Addicted to soccer and @manUTD
- Tweets97
- Following317
- Followers138
- Likes33

ALT Oftentimes, when you want to use a web font on your website or application, you know in advance which letters you'll need. This often occurs when you're using a web font in a logo or heading. In these cases, you should consider specifying a text= value in your font request URL. This allows Google to return a font file that's optimized for your request. In some cases, this can reduce the size of the font file by up to 90%. To use this feature, simply add text= to your Google Fonts API requests. For example if you're only using Inconsolata for the title of your blog, you can put the title itself as the value of text=. Here is what the request would look like: https://fonts.googleapis.com/css?family=Inconsolata&text=Hello As with all query strings, you should URL-encode the value: https://fonts.googleapis.com/css?family=Inconsolata&text=Hello%20World

ALT Demo: Is cross-origin fetch allowed? From https:/web.stanford.edu/class/cs253/: const res = await fetch('https://axess.stanford.edu') const data = await res.body.text() console.log(data) No! Would be a huge violation of Same Origin Policy. Any site in the world could read your grades if you're logged into Axess in another tab!























