What is the setting in IIS that can cause XAP to load every time you access the page from a new IE?

I have an example program that does nothing but Hello World. I open IE and proceed with my development and access Silverlight, it loads XAP for the first time, and then if I close IE and open again, XAP will not boot. Since there are no changes, I expect it to not be downloaded.

After deploying the QA environement, I open IE for the first time, it loads XAP as expected. Now close IE and open it again, I expect it will not load XAP, but it will load XAP again. But if I were updating on the page, it would not load XAp. So this only happens in Fresh IE, open in our QA environment.

All the above tests are performed in the same field with the same IE setting. Thus, there is no client-side IE caching issue. I checked the date and time on the servers to see if there is any difference, as indicated in silverlight XAP, the link is loaded every time and our servers match the date and time.

Does anyone know how to prevent IIS from loading every time?

+4
source share
1 answer

The default settings in IE mean that a new instance of IE will always try to extract each unique URL when it first occurs. IE does this even if cache headers sent with the resource the last time it was retrieved indicate that the resource is still fresh.

However, IE will send If-Modified-Since and / or If-None-Match when it re-requests a resource that has a copy in the cache. Therefore, the server has the ability to respond using 304 Not Modified , are you sure this is not happening? 304 does not have the body of the subject and therefore is a cheap answer.

Note that IE may make some strange heuristic options if the server cannot send cache control headers using the resource. One such option is that the resource is large enough and caching is not performed.

If you have not already done so, I would recommend that you set some reasonable expiration in the ClientBin folder in IIS Manager (in IIS7, select the ClientBin folder, select "HTTP Response Header", open "Set Common Headers ..", enable the Expire web resource.

+4
source

All Articles