Explain < @OutputCache% > and the usage of VaryByParam, VaryByHeader ?



Explain < @OutputCache% > and the usage of VaryByParam, VaryByHeader ?..

Answer / arunendra shukla

OutputCache is used to control the caching policies of an ASP.NET page or user control. To cache a page @OutputCache directive should be defined as follows < %@ OutputCache Duration="100" VaryByParam="none" % >
VaryByParam: A semicolon-separated list of strings used to vary the output cache. By default, these strings correspond to a query string value sent with GET method attributes, or a parameter sent using the POST method. When this attribute is set to multiple parameters, the output cache contains a different version of the requested document for each specified parameter. Possible values include none, *, and any valid query string or POST parameter name.
VaryByHeader: A semicolon-separated list of HTTP headers used to vary the output cache. When this attribute is set to multiple headers, the output cache contains a different version of the requested document for each specified header.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

I want to connect a system in LAN and I want to access that. Whenever I am moving a mouse in my desktop, the similar thing has to happen in another system in which I have connected. I need coding for this in C# and ASP.NET Can anyone please help me. It is very urgent. Thanks in advance. My email id is manojkumarchallagundla@gmail.com Will you please?

0 Answers   Excel,


Do ASP.NET forms authentication cookies provide any protection against replay attacks? Do they, for example, include the client's IP address or anything else that would distinguish the real client from an attacker?

1 Answers  


What is the difference between client-side and server-side validations in webpages?

0 Answers  


what cut off mark for po's,what questions they asked for interview?

0 Answers  


What is bound controls

0 Answers   MCN Solutions,






What are directives in asp.net? List down all the important directives.

0 Answers  


What is the displayafter property in updateprogress control?

0 Answers  


Hi please tell me what is ISNOTPOSTBACK,POSTBACK,AUTOPOSTBACK and also the extensions of aspx,asmx,ascx its urgent plz reply me soon....

6 Answers   Logica CMG,


What is asp.net architecture?

0 Answers  


On Age field how many Asp.Net validation controls will be suit?

7 Answers   NTTF Nettur Technical Training Foundation, Quest,


diff between Server.Transfer() and Server.Execute()

1 Answers  


Using code explain Configuration Management

0 Answers  


Categories