Our custom list definition stores some static files in the root folder (and sub-folders). Is there a way to manipulate the HTTP response header for these files to treat them as static (e.g., by setting the Expires header)?

We are considering using Disk-based Caching, but are concerned about authorization (not all users are allowed to see the static content).

  • Could you elaborate on what you mean by "static"? If you mean that nobody should be able to delete them? This could be done with an event receiver on the ItemDeleting event Jul 26, 2012 at 19:55
  • I am referring to images which will never change. We cannot store them in _layouts/ because they are specific to a list and other data (version). Jul 26, 2012 at 20:41

1 Answer 1


Normally these kind images are stored in _LAYOUTS (as you mention) or in Style Library in the site collection root, but they could be stored in any library really.

Take a look at the permission for Style Library and you will see your standard Visitors group has Read permissions only to this library. Note also that Members have Contribute permissions, so if you dont want them to have this permission on your images, create a sub folder and set even stricter permissions here, or create a new library for your images with special permissions.

You can read more about permissions in SharePoint here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.