*

Ivanko

  • *****
  • 391 posts
[BUG] failed to load 7 fonts on https
« on: February 02, 2018, 05:05:02 PM »
Hello
On https protocol a bug with 7 fonts, connection error, no response, not loading fonts due they are pointed on http.

No1
Request URL:https://mysite.com/oc-content/themes/veronika/fonts/open-sans.woff
Referrer Policy:no-referrer-when-downgrade
Request Headers
Provisional headers are shown
Origin:http://mysite.com
Referer:https://mysite.com/oc-content/themes/veronika/css/style.css?v=717
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36


no2
Request URL:https://mysite.com/oc-content/themes/veronika/fonts/fa/fonts/fontawesome-webfont.woff2?v=4.7.0
Referrer Policy:no-referrer-when-downgrade
Request Headers
Provisional headers are shown
Origin:http://mysite.com
Referer:https://mysite.com/oc-content/themes/veronika/fonts/fa/css/font-awesome.min.css
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

no3
Request URL:https://mysite.com/oc-content/themes/veronika/fonts/OpenSans14.woff2
Referrer Policy:no-referrer-when-downgrade
Request Headers
Provisional headers are shown
Origin:http://mysite.com
Referer:https://mysite.com/oc-content/themes/veronika/css/style.css?v=717
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

no4
Request URL:https://mysite.com/oc-content/themes/veronika/fonts/OpenSans13.woff2
Referrer Policy:no-referrer-when-downgrade
Request Headers
Provisional headers are shown
Origin:http://mysite.com
Referer:https://mysite.com/oc-content/themes/veronika/css/style.css?v=717
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

no5
Request URL:https:///mysite.com/oc-content/themes/veronika/fonts/fa/fonts/fontawesome-webfont.woff?v=4.7.0
Referrer Policy:no-referrer-when-downgrade
Request Headers
Provisional headers are shown
Origin:http://mysite.com
Referer:https://mysite.com/oc-content/themes/veronika/fonts/fa/css/font-awesome.min.css
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Query String Parameters
view source
view URL encoded
v:4.7.0

no6
Request URL:https://mysite.com/oc-content/themes/veronika/fonts/OpenSans9.woff2
Referrer Policy:no-referrer-when-downgrade
Request Headers
Provisional headers are shown
Origin:http://mysite.com
Referer:https://mysite.com/oc-content/themes/veronika/css/style.css?v=717
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

no7
Request URL:https://mysite.com/oc-content/themes/veronika/fonts/fa/fonts/fontawesome-webfont.ttf?v=4.7.0
Referrer Policy:no-referrer-when-downgrade
Request Headers
Provisional headers are shown
Origin:http://mysite.com
Referer:https://mysite.com/oc-content/themes/veronika/fonts/fa/css/font-awesome.min.css
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Query String Parameters
view source
view URL encoded
v:4.7.0



Please prove best and easy solution.
« Last Edit: February 02, 2018, 05:17:28 PM by Ivanko »

*

MB Themes

Re: [BUG] failed to load 7 fonts on https
« Reply #1 on: February 02, 2018, 05:49:42 PM »
@Ivanko
Isn't it telling about some policy in browser? I had same issue and solved via htaccess update.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ivanko

  • *****
  • 391 posts
Re: [BUG] failed to load 7 fonts on https
« Reply #2 on: February 02, 2018, 06:17:49 PM »
right now it is like this

do I need to add something ??

Code: [Select]
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml

# Removing browser bugs for older browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>






<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

*

Ivanko

  • *****
  • 391 posts
Re: [BUG] failed to load 7 fonts on https
« Reply #3 on: February 02, 2018, 06:26:32 PM »
this error comes also on
https://gtmetrix.com/

no matter which browser (.

*

Ivanko

  • *****
  • 391 posts
Re: [BUG] failed to load 7 fonts on https
« Reply #4 on: February 02, 2018, 06:28:17 PM »
seems this helps
Code: [Select]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


How did you solve ?


*

Anonymous

  • ****
  • 200 posts
Re: [BUG] failed to load 7 fonts on https
« Reply #5 on: February 02, 2018, 06:31:52 PM »
Code: [Select]
.woff2?v=4.7.0look at that line,  yours apache deflate and modzip module didnt getting type of file,

either remove slashes style.css?v=717  or

Header append Vary User-Agent.

if nothing works, then remove all htaccess content , and analyse your site at https://gtmetrix.com/,   






well try this out!!
Code: [Select]
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|)$">
 Header set Access-Control-Allow-Origin "*"
</FilesMatch>

Code: [Select]
Header set Access-Control-Allow-Origin "*"

« Last Edit: February 02, 2018, 06:41:26 PM by Anonymous »
Innovation is change that unlocks new value  ;)

*

Ivanko

  • *****
  • 391 posts
Re: [BUG] failed to load 7 fonts on https
« Reply #6 on: February 02, 2018, 07:01:55 PM »
Code: [Select]
.woff2?v=4.7.0look at that line,  yours apache deflate and modzip module didnt getting type of file,

either remove slashes style.css?v=717  or

Header append Vary User-Agent.

if nothing works, then remove all htaccess content , and analyse your site at https://gtmetrix.com/,   






well try this out!!
Code: [Select]
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|)$">
 Header set Access-Control-Allow-Origin "*"
</FilesMatch>

Code: [Select]
Header set Access-Control-Allow-Origin "*"

Option 1 dosent help Connection error for 7 fonts.

2nd option help with error but return 204 - No content...

*

Anonymous

  • ****
  • 200 posts
Re: [BUG] failed to load 7 fonts on https
« Reply #7 on: February 03, 2018, 05:11:10 AM »
Am used * & that works for Me!

Well! Have a look! May be this will sort out your issue!
Don't forget to remove yours htaccess.

Be caution! With .htaccess changes!

https://stackoverflow.com/questions/5008944/how-to-add-an-access-control-allow-origin-header
Innovation is change that unlocks new value  ;)