Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE and Cache-Control #6454

Closed
chandon opened this issue May 11, 2015 · 12 comments
Closed

IE and Cache-Control #6454

chandon opened this issue May 11, 2015 · 12 comments

Comments

@chandon
Copy link

chandon commented May 11, 2015

I had some issue with FA not displayed on IE11
After investigating, it was because my web server forced "no-store" in Cache-control header (perhaps avoiding some .eot #iefix reloading ?)

Perhaps it should be noticed here : https://github.com/FortAwesome/Font-Awesome/wiki/Troubleshooting

@tagliala
Copy link
Member

@chandon feel free to edit that wiki and point to this issue, thanks!

leaving this open

@chandon
Copy link
Author

chandon commented May 12, 2015

Done in the "I'm hosting fonts on my server and icons don't show up" section

@chandon chandon closed this as completed May 12, 2015
@tagliala
Copy link
Member

Perfect, thanks! 👍

@0xhari
Copy link

0xhari commented Aug 26, 2016

Removing global "Pragma: no-cache" on HTTP server header fixes this issue.

@tagliala
Copy link
Member

@hailhash

https://github.com/FortAwesome/Font-Awesome/wiki/Troubleshooting#im-hosting-fonts-on-my-server-and-icons-dont-show-up

For Internet Explorer and HTTPS: you don't serve files with no-cache option in Pragma header.

@Rahul-Bisht
Copy link

setting [Cache-Control:'no-store'] worked for me.

@haripalpatil
Copy link

@Rahul-Bisht how and where did you set [Cache-control:'no-store'] to FA work in IE, can you please provide further detail. I am getting same issue on IE 11.

@tagliala
Copy link
Member

tagliala commented Jan 21, 2019

@haripalpatil cache control is a parameter to set on the webserver and/or response headers and it is not a Font Awesome setting.

You should remove Cache-control: no-store as well as Pragma: no-cache

Ref:

@haripalpatil
Copy link

@haripalpatil cache control is a parameter to set on the webserver and/or response headers and it is not a Font Awesome setting.

You should remove Cache-control: no-store as well as Pragma: no-cache

Ref:

@tagliala Thanks for your quick reply, the response I am getting from server does not contain either of these value in response header (i.e. Cache-controlL no-store as well as Pragma: no-cache) so no need to remove, still IE 11 on my machine not able to download the font file.

If I use Charles to debug the font awesome GET call, I am getting error as "Client closed connection before receiving entire response"

Also while debugging Charles I found out that if I remove following from response header, I am able to download font file.
Vary: Origin

Also all this work fine if I user latest IE version.

@ahadik
Copy link

ahadik commented Apr 23, 2019

We recently had this issue serving Font Awesome font files from our Rails application. The confusion was that we weren't passing Pragma or Cache-control response headers - so the previous answers in this post were a bit confusing.

To summarize - this issue is caused by these two conditions:

  1. The request is being initiated from font-face, over an HTTPS connection (critical for re-producing this bug locally).
  2. The Pragma header has the value no-cache OR in our case, we're serving everything gzipped, and the Vary header is passed with a value other than Accept-Encoding.

We fixed this by adding the following to our Rack::CORS config:

config.middleware.insert_before 0, Rack::Cors do
      allow do
        origins '*'

        # Setting Vary to Accept-Encoding required or IE11 fonts will not load from local cache
        resource('*.eot',
                 headers: :any,
                 credentials: false,
                 methods: [:get],
                 vary: ['Accept-Encoding'])
      end
    end

@haripalpatil this might be of use to you.

@tagliala
Copy link
Member

@Yan2603
Copy link

Yan2603 commented May 21, 2019

I had the same problem ,resolve by remove Cache-control: no-store and Pragma: no-cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants