DPDK website maintenance
 help / color / mirror / Atom feed
* [dpdk-web] [PATCH] use cached fonts
@ 2016-05-26 10:40 Thomas Monjalon
  2016-05-26 12:35 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Monjalon @ 2016-05-26 10:40 UTC (permalink / raw)
  To: web

Accelerate page loading by downloading fonts from the CDN.

Note that it is a cross-domain resource request (CORS).
It is solved by adding the following header when serving fonts:
	Access-Control-Allow-Origin *
---
 fonts.css | 60 ++++++++++++++++++++++++++++++------------------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/fonts.css b/fonts.css
index 7a2ba0d..2260dfd 100644
--- a/fonts.css
+++ b/fonts.css
@@ -1,61 +1,61 @@
 @font-face {
 	font-family: 'opensans';
-	src: url('/fonts/opensans-regular.eot');
-	src: url('/fonts/opensans-regular.eot?#iefix') format('embedded-opentype'),
-	     url('/fonts/opensans-regular.woff') format('woff'),
-	     url('/fonts/opensans-regular.ttf') format('truetype'),
-	     url('/fonts/opensans-regular.svg#open_sansregular') format('svg');
+	src: url('http://fast.dpdk.org/fonts/opensans-regular.eot');
+	src: url('http://fast.dpdk.org/fonts/opensans-regular.eot?#iefix') format('embedded-opentype'),
+	     url('http://fast.dpdk.org/fonts/opensans-regular.woff') format('woff'),
+	     url('http://fast.dpdk.org/fonts/opensans-regular.ttf') format('truetype'),
+	     url('http://fast.dpdk.org/fonts/opensans-regular.svg#open_sansregular') format('svg');
 	font-weight: normal;
 	font-style: normal;
 }
 @font-face {
 	font-family: 'opensans';
-	src: url('/fonts/opensans-semibold.eot');
-	src: url('/fonts/opensans-semibold.eot?#iefix') format('embedded-opentype'),
-	     url('/fonts/opensans-semibold.woff') format('woff'),
-	     url('/fonts/opensans-semibold.ttf') format('truetype'),
-	     url('/fonts/opensans-semibold.svg#open_sanssemibold') format('svg');
+	src: url('http://fast.dpdk.org/fonts/opensans-semibold.eot');
+	src: url('http://fast.dpdk.org/fonts/opensans-semibold.eot?#iefix') format('embedded-opentype'),
+	     url('http://fast.dpdk.org/fonts/opensans-semibold.woff') format('woff'),
+	     url('http://fast.dpdk.org/fonts/opensans-semibold.ttf') format('truetype'),
+	     url('http://fast.dpdk.org/fonts/opensans-semibold.svg#open_sanssemibold') format('svg');
 	font-weight: bold;
 	font-style: normal;
 }
 @font-face {
 	font-family: 'opensans';
-	src: url('/fonts/opensans-italic.eot');
-	src: url('/fonts/opensans-italic.eot?#iefix') format('embedded-opentype'),
-	     url('/fonts/opensans-italic.woff') format('woff'),
-	     url('/fonts/opensans-italic.ttf') format('truetype'),
-	     url('/fonts/opensans-italic.svg#open_sansitalic') format('svg');
+	src: url('http://fast.dpdk.org/fonts/opensans-italic.eot');
+	src: url('http://fast.dpdk.org/fonts/opensans-italic.eot?#iefix') format('embedded-opentype'),
+	     url('http://fast.dpdk.org/fonts/opensans-italic.woff') format('woff'),
+	     url('http://fast.dpdk.org/fonts/opensans-italic.ttf') format('truetype'),
+	     url('http://fast.dpdk.org/fonts/opensans-italic.svg#open_sansitalic') format('svg');
 	font-weight: normal;
 	font-style: italic;
 }
 
 @font-face {
 	font-family: 'exo2';
-	src: url('/fonts/exo2-regular.eot');
-	src: url('/fonts/exo2-regular.eot?#iefix') format('embedded-opentype'),
-	     url('/fonts/exo2-regular.woff') format('woff'),
-	     url('/fonts/exo2-regular.ttf') format('truetype'),
-	     url('/fonts/exo2-regular.svg#exo_2.0regular') format('svg');
+	src: url('http://fast.dpdk.org/fonts/exo2-regular.eot');
+	src: url('http://fast.dpdk.org/fonts/exo2-regular.eot?#iefix') format('embedded-opentype'),
+	     url('http://fast.dpdk.org/fonts/exo2-regular.woff') format('woff'),
+	     url('http://fast.dpdk.org/fonts/exo2-regular.ttf') format('truetype'),
+	     url('http://fast.dpdk.org/fonts/exo2-regular.svg#exo_2.0regular') format('svg');
 	font-weight: normal;
 	font-style: normal;
 }
 @font-face {
 	font-family: 'exo2';
-	src: url('/fonts/exo2-bold.eot');
-	src: url('/fonts/exo2-bold.eot?#iefix') format('embedded-opentype'),
-	     url('/fonts/exo2-bold.woff') format('woff'),
-	     url('/fonts/exo2-bold.ttf') format('truetype'),
-	     url('/fonts/exo2-bold.svg#exo_2.0bold') format('svg');
+	src: url('http://fast.dpdk.org/fonts/exo2-bold.eot');
+	src: url('http://fast.dpdk.org/fonts/exo2-bold.eot?#iefix') format('embedded-opentype'),
+	     url('http://fast.dpdk.org/fonts/exo2-bold.woff') format('woff'),
+	     url('http://fast.dpdk.org/fonts/exo2-bold.ttf') format('truetype'),
+	     url('http://fast.dpdk.org/fonts/exo2-bold.svg#exo_2.0bold') format('svg');
 	font-weight: bold;
 	font-style: normal;
 }
 @font-face {
 	font-family: 'exo2';
-	src: url('/fonts/exo2-blackitalic.eot');
-	src: url('/fonts/exo2-blackitalic.eot?#iefix') format('embedded-opentype'),
-	     url('/fonts/exo2-blackitalic.woff') format('woff'),
-	     url('/fonts/exo2-blackitalic.ttf') format('truetype'),
-	     url('/fonts/exo2-blackitalic.svg#exo_2.0black_italic') format('svg');
+	src: url('http://fast.dpdk.org/fonts/exo2-blackitalic.eot');
+	src: url('http://fast.dpdk.org/fonts/exo2-blackitalic.eot?#iefix') format('embedded-opentype'),
+	     url('http://fast.dpdk.org/fonts/exo2-blackitalic.woff') format('woff'),
+	     url('http://fast.dpdk.org/fonts/exo2-blackitalic.ttf') format('truetype'),
+	     url('http://fast.dpdk.org/fonts/exo2-blackitalic.svg#exo_2.0black_italic') format('svg');
 	font-weight: bold;
 	font-style: italic;
 }
-- 
2.7.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-web] [PATCH] use cached fonts
  2016-05-26 10:40 [dpdk-web] [PATCH] use cached fonts Thomas Monjalon
@ 2016-05-26 12:35 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-05-26 12:35 UTC (permalink / raw)
  To: web

2016-05-26 12:40, Thomas Monjalon:
> Accelerate page loading by downloading fonts from the CDN.
> 
> Note that it is a cross-domain resource request (CORS).
> It is solved by adding the following header when serving fonts:
> 	Access-Control-Allow-Origin *

Fastly applied

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-26 12:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-26 10:40 [dpdk-web] [PATCH] use cached fonts Thomas Monjalon
2016-05-26 12:35 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).