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

Should I delete cookies?

0 Answers  


In a Repeater control how one can provide an alternating color scheme ?

0 Answers   Siebel,


You are using the try? catch block seen in the following code segment, but no exceptions are ever caught by the catch block. What is the problem? SqlConnection cn =new sqlConnection(strSQL); SqlDataSet ds; try { cn.open(); //perform the data processing steps ??.. } catch (OleDbException e) { ?.. } a) The exception class is wrong; it should be sqlErrors. b) The exception class is wrong; it should be sqlSyntaxExceptios. c) The exception class is wrong; it should be sqlExceptions. d) The exception class is wrong; it should be sqlExcptions.

2 Answers   Microsoft, Syntax Softtech,


What is skin in asp.net?

0 Answers  


What is state management in asp.net and define Client-side state management and Server-side state management?

2 Answers   TVS,


how to get modified rows from Dataset

1 Answers   CGI,


Explain login controls.

0 Answers  


how to add cliet side event to server side? and how to register client script to sever side? wt difference these two

3 Answers   PSI Data Systems,


what are webservices?In which circumstances we can go for webservices?

3 Answers   Microsoft,


Explain difference between friend and protected friend?

0 Answers  


What is custom events?

0 Answers  


When during the page processing cycle is ViewState available?

1 Answers   Siebel Systems,


Categories