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

Comments

Projects
None yet
7 participants
@chandon
Copy link

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

This comment has been minimized.

Copy link
Member

commented May 12, 2015

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

leaving this open

@chandon

This comment has been minimized.

Copy link
Author

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 May 12, 2015

@tagliala

This comment has been minimized.

Copy link
Member

commented May 13, 2015

Perfect, thanks! 👍

@hailhash

This comment has been minimized.

Copy link

commented Aug 26, 2016

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

@tagliala

This comment has been minimized.

Copy link
Member

commented Aug 26, 2016

@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

This comment has been minimized.

Copy link

commented May 22, 2017

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

@haripalpatil

This comment has been minimized.

Copy link

commented Jan 21, 2019

@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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link

commented Jan 22, 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:

@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

This comment has been minimized.

Copy link

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

This comment has been minimized.

@zikuai

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.