4
votes

I've trouble with the new FireFox 4.0 Release.

In my Website i hosted a Silverlight Object, named Visualisation.

In Firefox 3.6, Chrome, IE 7, 8, 9 the Browsers load the XAP File Once and get it from cache if not then do a postback or re-enter the site.

In FF 4 it reloads XAP File everytime i enter the site.

I tried a lot and searched the web but have no idea to fix the problem.

My Silverlight Object has the:

<param name="enableCacheVisualization" value="true"/>

The Site which hosted the Object has the Page Head

<%@ OutputCache Duration="600000" VaryByParam="none" %>

and i have an own web.config in the ClientBin folder:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <location path="Visualisation.xap">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
      </staticContent>
    </system.webServer>
  </location>
</configuration>

Any Ideas? The site runs on a IIS7 (Win 2008 Server) with .Net 4.0 and c# as Backcode

hope for hints

2

2 Answers

1
votes

I'd use firebug under the net tab to see what cache headers are being sent by your web server. You want to see something like: Cache-Control: max-age=31536000 and maybe an Etag.

There is a setting for caching under HTTP Headers in IIS under the common headers menu I think.

Another thing you might try playing with is the MIME type. It should be "Content-Type: application/x-silverlight-app"

If the headers are getting sent correctly and Firefox is choosing to ignore them, then there might not be anything you can do.

I've actually had the opposite problem with Chrome. Chrome seems to be very agressive with it's caches and I find myself running old versions of .xaps.

1
votes

It seems firefox 4.0+ caches only files with 5MB or less in size.
See bug report