1

is any way to cache a whole folder with resources in ASP.NET without write own HttpModule? e.g.: folder with Wysiwyg editor javascript and styles

2 Answers 2

2

One way this can be done is by using the "Enable Content Expiration" setting in the IIS, you can set the expiration date for that folder to some date far in the future.

WYSIWYG Editor Folder (Right Click) -> Properties -> HTTP Headers -> Enable Content Expiration checkbox in IIS5/6.

Sign up to request clarification or add additional context in comments.

Comments

2

The purpose of ASP.NET caching is so that the requests no longer need to be processed in full, meaning that the database doesn't have to be queried, the content doesn't have to be produced, templates instantiated, event handlers called, and so forth.

Caching static objects this way yields no performance improvement as there is no processing required for static content. ASP.NET doesn't process these items anyway. IIS will probably cache them through the OS's caching features.

I should note that caching is automatically done by clients for static content, so it's very unlikely that revisiting clients download the same object twice.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.