Can you cache a web page on the basis of stylesheets?

 Posted by Ddd on 3/22/2011 | Category: ASP.NET Interview questions | Views: 2996 | Points: 40
Answer:

Yes, we can cache a web page on the basis of stylesheets.

Use the VaryByCustom attribute in the OutputCachde directive
example:
<%@ OutputCache Duration="1000" VaryByParam="None" VaryByCustom="css" %>


| Alert Moderator 

Comments or Responses

Posted by: Akiii on: 3/23/2011 | Points: 10
@Ddd .....

Can you describe a bit what do you mean by this question.....?

Thanks and Regards
Akiii
Posted by: Ddd on: 3/23/2011 | Points: 10
The question is about Caching which can be controlled through a number of
parameters which can be a variable, object, querystring, browser, css etc.
According to the directive,if the stylesheet is applied on a web page, its
effect should not change for the specified duration when some other style
is applied during that duration.
I hope it is fine.
Thanks,
Ddd.

Posted by: Akiii on: 3/23/2011 | Points: 10
thanks for the reply...
i want to try this.....
do you have any code or can you tell me how to test what u have told me ??

Thanks for your help
Akiii
Posted by: Webmaster on: 3/23/2011 | Points: 10
Akii,

Please do not ask these types of questions in the responses of the Interview Questions. Please use Forums section http://www.dotnetfunda.com/forums/ for any kind of question or discussion on related topic.

Thanks
Posted by: Akiii on: 3/23/2011 | Points: 10
@webmaster....

i am extremely sorry if i have broke any rule...
i will not post anything......

Akiii
Posted by: Chvrsri on: 3/23/2011 | Points: 10
Dear Akiii,

I just want to remind you it is not a rule.It is more like a practice which makes every thing look organized.Hope you take it in a positive way.


Posted by: Akiii on: 3/23/2011 | Points: 10
No No, i mean i will not post my questions here, i will post those elsewhere as suggested by webmaster....

Sorry....
Akiii

Login to post response