• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Web Fonts, HTTPS and CDN : Error and Solution

By Abhishek Ghosh August 18, 2014 11:48 am Updated on August 18, 2014

Web Fonts, HTTPS and CDN : Error and Solution

Advertisement

This guide is Intended to solve the errors associated with Web Fonts when served from Rackspace Cloud Files for a webpage using HTTPS. You need to read these two previously published articles to simply check if you already know the basic stuffs – How To Use Any Web Font From Own Hosted Library and Serving Fonts from Rackspace Cloud Files CDN. Practically we have mentioned the second linked article about the requirement of extra X Header. This is an old video to use Rackspace Cloud Files, but practically the basic rule is same to upload files which PHP based scripts or Plugins might fail to upload :

View the video at [1080p] by the click-selecting the gear icon. The interface, API and features of Rackspace Cloud Files CDN has been changed since this video was created, but the basic – again to repeat, has remained the same.

 

Web Fonts, HTTPS and CDN : Error With Woff

 

Woff can make you to say Uff! First, on the server’s virtual host file; we need to add (nginx) :

Advertisement

---

Vim
1
2
3
location ~ \.(ttf|ttc|otf|eot|woff|font.css|css)$ {
           add_header Access-Control-Allow-Origin "*";
}

or add these on .htaccess (Apache2) :

Basically, we whitelisted the CDN to push the fonts on HTTPS pages. Woff has specific problem, it is a compressed format. We are not even thinking about Microsoft’s great browsers IE ver {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, X, Y}, these will solve issue with non IE browser, where the web server is running a sane Operating System (GNU Linux or any BSD). For Woff, you will face “Access-Control-Allow-Origin” issue on Chrome, Chromium, Firefox etc. browsers. Currently Safari (Mac users unlikely to use older softwares) understands Woff is a Font, not a Bomb. If all people used an universal browser, there would be lesser problem; unfortunately the monetary gain from Browser is assumed to be quite higher by referring to the search engines (= Ads), helping Amazon to sell products (bookmarks by default has some websites…). This is the needed work on Server only.

Web Fonts, HTTPS and CDN

 

Web Fonts, HTTPS and CDN : WTF is CORS You Wrote in .htaccess?

 

CORS is a kind of curse. CORS stands for Cross-site HTTP requests, these are HTTP requests for fetching resources from a different domain other than the webpage’s domain. For instance, a resource loaded from Domain A (http://domain.example) such as an HTML web page, makes a request for a resource on Domain B as CDN (http://domain.foo), static materials including your fonts – this occurs very commonly on the web today ” pages load a number of resources in a cross-site manner, including CSS stylesheets, images and scripts, and other resources. Unfortunately, there are morons who thinks, injection is done via other domain – it is rare. In fact, most exploits are ran using a security flaw of a file on the main domain to escape getting caught – (http://domain.example/my-php-with-flaw.php?ver=2.0?//ip.ip.ip.ip/exploit/return/this/as/txt). Historically Gecko added it, before that, there was no problem. Even if HTTP standard changes, these issues are unlikely to be corrected to allow a less painful – technically, for fonts, images if another domain co-uses it, it should not be a headache of the browser “manufactures”.

 

Web Fonts, HTTPS and CDN : Managing Rackspace Cloud Files Side

 

Quite easy. Rackspace Cloud File’s origin ( read Akamai Edge Servers) can compress, while files which are stored are uncompressed, the CDN will respond to accept-encoding headers from browsers by delivering compressed files from the CDN edge locations. This compression is restricted to html, javascript and css files. Additionally, we could compress files manually and set the content-encoding header, but this is not used because of IE ver {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, X, Y} users. In other words, Rackspace actually reduces your headache fully automatically via Cloud DNS – Cloud Server – Cloud Files as an unified origin. But for complicated stuffs, we need to work. Cyberduck can be used to set these headers but you can use the Cloud Files control panel, click the file’s gear icon to add header you are having issue with :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
------------------------------------------------------------------------------
File Types      Header Name                   Value needed to be added      
------------------------------------------------------------------------------
.eot            Access-Control-Allow-Origin   application/vnd.ms-fontobject  
------------------------------------------------------------------------------
.otf            Access-Control-Allow-Origin   font/opentype                  
------------------------------------------------------------------------------
.woff           Access-Control-Allow-Origin   application/font-woff          
------------------------------------------------------------------------------
(safe to add)   Access-Control-Allow-Origin   *                              
------------------------------------------------------------------------------
.svg            Access-Control-Allow-Origin   image/svg+xml                  
------------------------------------------------------------------------------

This is a plain text file, so that you can copy the value easily.

Tagged With Abhishek font

This Article Has Been Shared 893 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Web Fonts, HTTPS and CDN : Error and Solution

  • Google F1 : Distributed RDBMS replacement for MySQL

    Google F1, The Fault-Tolerant Distributed RDBMS is targated to be replacement for MySQL. This claimed to be perform better like serving Ads from crap servers.

  • Cloud Computing Benefits for Small Business

    Cloud Computing Benefits for Small Business are not that focused than the providers do to show advantages for the Enterprises. Strategy can make ROI more.

  • GoDaddy Buys Media Temple : Thoughts and Ideas

    GoDaddy Buys Media Temple – four days has been passed since we all know about the acquisition. Thoughts and Helps for the old Clients and technical notes.

  • Technical Aspects of Data Security in the Cloud

    Technical aspects of data security in the cloud is one of the main reason why the companies or the end users thinks to be in the cloud. Here is a discussion.

  • Browser Based Chat, Screen Sharing System With HTML5 WebRTC

    Browser based chat including video chat, Screen Sharing are possible with HTML5 WebRTC. Here are some resources which you can run on Cloud as App.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Configuration Management February 5, 2023
  • What is ChatGPT? February 3, 2023
  • Zebronics Pixaplay 16 : Entry Level Movie Projector Review February 2, 2023
  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Web Fonts, HTTPS and CDN : Error and Solution," in The Customize Windows, August 18, 2014, February 6, 2023, https://thecustomizewindows.com/2014/08/web-fonts-https-cdn-error-solution/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT