0
votes

I am trying the figure out why the images (or js, or css) in the _layouts directory are not cached by either IE or FF.

The authentication on the site collection is NTLM. The _layouts folder has anonymous access enabled in IIS.

If I debug with fiddler a page that has been loaded before, I can see the following requests:

GET /_layouts/MyApplication/Images/newProject.png HTTP/1.1 401 Unauthorized

GET /_layouts/MyApplication/Images/newProject.png HTTP/1.1 401 Unauthorized

GET /_layouts/MyApplication/Images/newProject.png HTTP/1.1 200 OK

...

Cache-Control: max-age=31536000

Last-Modified: Tue, 09 Feb 2010 14:40:01 GMT

ETag: "5945d7c295a9ca1:3d0416"

...

This happens for each subsequent access of the page. Do you have any idea why the image is not cached?

Thank you

1
Can you try turning off NTLM authentication for that directory to see if that changes the behaviour?a'r
If I uncheck Integrated Windows Authentication in IIS Manager for this folder and check Anonymous Access with an administrator account the script and images in that folder are not loaded anymore. I just get 401 Unathorized for them.user204906

1 Answers

0
votes

I don't think this has anything to do with Caching. Your images are simply not accessible.

Though in theory your setup should just work, I would check the following:

  • Application Pool - Make sure your sub application ('MyApplciation') is using the same App Pool as the main SharePoint site. I've encountered problem with this before, I couldn't find a solution for this so ended up assigning the same application pool.
  • IIS - If you have set up a virtual directory / application, check all of security settings. I would definately try to delete any virtual directory nodes and then seeing if I can access the images.
  • If you're using a CAS policy, try changing it to an out of the box configuration.
  • If all else fails, consider moving your images to _layouts/images/ (I know, not ideal but might be a work around)

Can't think of anything else at the moment.