1 Reply Latest reply on Jan 5, 2012 8:08 PM by Sham HC

    problem with caching a .eot font file

    kasq Level 3



      We have problem with caching by dispatcher ptsans-regular.eot file used in one of our project.


      We are using follwoing css file:


      @font-face {

          font-family: 'PT Sans';

          src: url('ptsans-regular.eot');

          src: url('ptsans-regular.eot?#iefix') format('embedded-opentype'),

              local('PT Sans'), local('PTSans-Regular'), url('ptsans-regular.woff') format('woff'),

              local('PT Sans'), local('PTSans-Regular'), url('ptsans-regular.ttf') format('truetype');

          font-weight: normal;

          font-style: normal;


      @font-face {

          font-family: 'PT Sans';

          src: url('ptsans-bold.eot');

          src: url('ptsans-bold.eot?#iefix') format('embedded-opentype'),

              local('PT Sans Bold'), local('PTSans-Bold'), url('ptsans-bold.woff') format('woff'),

              local('PT Sans Bold'), local('PTSans-Bold'), url('ptsans-bold.ttf') format('truetype');

          font-weight: bold;

          font-style: normal;


      As you can see in this css, there is refrence to ptsans-regular.eot with attribute ?iefix at the end. This means that in each request to this file, the file is not cached by dispatcher, becuase there is always reference to additional attribute.

      Is in the CQ or in the Dispatcher configuration a way to avoid this kind of problem - I mean to force a dispatcher to cache this file even if there is additional attribute during the request to the server.


      Thanks a lot for any anaswer.




        • 1. Re: problem with caching a .eot font file
          Sham HC Level 7

          Unfortunately there is no configuration is dispatcher to bypass querystring without hitting instance.


          However in your case  attribute ?iefix at the end of url is introduced to fool IE to load just the EOT file due to IE parsers bug if you have more than 1 font format in the src attribute. So what you can do is write a apache/IIS rewrite rule to trim querystring when ever there is a request for eot file.