Google News
logo
ASP.NET - Quiz(MCQ)
How will you specifying the Cache Location?
A)
You can use browser settings to specify where a page is cached.
B)
You can use the Location attribute in QueryString to specify where a page is cached.
C)
You can use the Location attribute of the < %@ OutputCache %> directive to specify where a page is cached.
D)
None of the Above.

Correct Answer :   You can use the Location attribute of the < %@ OutputCache %> directive to specify where a page is cached.


Explanation :

By default, when you use Page Output Caching, a page is cached in three locations : web server, any proxy servers, and browser. You can write following code to cache the page on server for 50 seconds.
 
< %@ OutputCache Duration="50" VaryByParam="none" Location=”Server” %>

Advertisement