English 中文(简体)
Caching of images and script in the _layouts directory
原标题:

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

问题回答

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.





相关问题
Write-though caching of large data sets in WCF?

We ve got a smart client that talks to a SQL Server database via WCF, displaying the entities in the database, and allowing the user to edit those entities. Some of the WCF calls return a large data ...

Clearing RSL in Cache

I have built a flex application which has a "main" project and it is assosciated with a few RSL s which are loaded and cached once i run my "main" application. The problem i am facing is that the ...

how to tell clicking "back" to load cache?

I would like for my site when someone clicks "Back" or "Forward" for the server to tell the browser to load the cache instead of reloading the entire page. I ve tested some headers and done research, ...

java plugin cache and dynamic IP host

I m trying to use Amazon S3 and Amazon Cloudfront CDN to deliver the jar files of my applet application. I m seeing several cache misses of my jars by the java plugin. This is a show-stopper for me, ...

Frequently Used metadata Hashmap

Are there any implementations of a static size hashtable that limits the entries to either the most recently or most frequently used metadata? I would prefer not to keep track of this information ...

PHP - Memcache - HTML Caching

I would like to create a caching system that will bypass some mechanisms in order to improve the performance. I have some examples: 1-) I have a dynamic PHP page that is updated every hour. The page ...

Performance of Sql subqueriesfunctions

I am currently working on a particularly complex use-case. Simplifying below :) First, a client record has a many-to-one relationship with a collection of services, that is, a single client may have ...

热门标签