Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonas Eriksson 930 posts 1825 karma points
    Jan 05, 2010 @ 11:13
    Jonas Eriksson
    0

    How to set page expiration on member pages?

    Hi!

    I'd like to set page expiration to 0 for all member pages so that the users can log out safely and their pages wont be cached. But how? MSDN tell me to set it by a page directive or by code. Is that the best way? Is there a preffered Umbraco-way?

    http://msdn.microsoft.com/en-us/library/y18he7cw.aspx

    Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
    Response.Cache.SetCacheability(HttpCacheability.Public);
    Response.Cache.SetValidUntilExpires(true);
  • Jonas Eriksson 930 posts 1825 karma points
    Jan 05, 2010 @ 15:17
    Jonas Eriksson
    0

    Ended up creating an xslt-extension with the above rows, exept for the first where 60 seconds made caching go bananas, changed to 1 second instead and it works fine for me. I use the xslt & css-friendly ca login controls by the way.

Please Sign in or register to post replies

Write your reply to:

Draft