Re: content expiration?

Discussion in 'ASP .Net' started by Daenil of GL, Feb 25, 2004.

  1. Daenil of GL

    Daenil of GL Guest

    Thank you for your reply.
    On the Response.Cache.SetCacheability(HttpCacheablility.Nocache), would that
    go in the old "Spaghetti Code" render blocks or something else? That is the
    part that loses me.

    "Teemu Keiski" <> wrote in message
    news:eMniTM3%...
    > You can set in Page directive
    > <% @Outputcache Location="none" %>
    >
    > which should set the headers and you can do that in code:
    >
    > Response.Cache.SetCacheability(HttpCacheability.NoCache)
    >
    > --
    > Teemu Keiski
    > MCP, Microsoft MVP (ASP.NET), AspInsiders member
    > ASP.NET Forum Moderator, AspAlliance Columnist
    >
    >
    >
    >
    >
    > "Daenil of GL" <webmaster@!nospam.visualsun.ws> wrote in message
    > news:...
    > > Ok, I am looking for how you make a webpage expire immediately so when

    you
    > > hit refresh, you receive new data. In old ASP, you would just do
    > > <%
    > > Response.Expires = 60
    > > Response.Expiresabsolute = Now() - 1
    > > Response.AddHeader "pragma","no-cache"
    > > Response.AddHeader "cache-control","private"
    > > Response.CacheControl = "no-cache"
    > > %>
    > > Since that no longer works in ASP.NET, I was looking for how you do this
    > > now...
    > >
    > > Thanks,
    > > Daniel Gormley
    > > Visual SUN Studios
    > >
    > >

    >
    >
     
    Daenil of GL, Feb 25, 2004
    #1
    1. Advertising

  2. Daenil of GL

    Daenil of GL Guest

    Here is what i have tried and it doesnt work:

    <%@ outputcache duration="60" varybyparam="None" %>
    <% Response.Cache.SetCacheability(HttpCacheability.NoCache) %>
    <% Response.CacheControl = "no-cache" %>
    <% Response.AddHeader ("Pragma", "no-cache") %>
    <% Response.Expires = -1 %>

    This is in the very top of my page right under the <%@ Page Language="VB" %>

    What am i doing wrong?

    "Daenil of GL" <webmaster@!nospam.visualsun.ws> wrote in message
    news:OPnjiI4%...
    > Thank you for your reply.
    > On the Response.Cache.SetCacheability(HttpCacheablility.Nocache), would

    that
    > go in the old "Spaghetti Code" render blocks or something else? That is

    the
    > part that loses me.
    >
    > "Teemu Keiski" <> wrote in message
    > news:eMniTM3%...
    > > You can set in Page directive
    > > <% @Outputcache Location="none" %>
    > >
    > > which should set the headers and you can do that in code:
    > >
    > > Response.Cache.SetCacheability(HttpCacheability.NoCache)
    > >
    > > --
    > > Teemu Keiski
    > > MCP, Microsoft MVP (ASP.NET), AspInsiders member
    > > ASP.NET Forum Moderator, AspAlliance Columnist
    > >
    > >
    > >
    > >
    > >
    > > "Daenil of GL" <webmaster@!nospam.visualsun.ws> wrote in message
    > > news:...
    > > > Ok, I am looking for how you make a webpage expire immediately so when

    > you
    > > > hit refresh, you receive new data. In old ASP, you would just do
    > > > <%
    > > > Response.Expires = 60
    > > > Response.Expiresabsolute = Now() - 1
    > > > Response.AddHeader "pragma","no-cache"
    > > > Response.AddHeader "cache-control","private"
    > > > Response.CacheControl = "no-cache"
    > > > %>
    > > > Since that no longer works in ASP.NET, I was looking for how you do

    this
    > > > now...
    > > >
    > > > Thanks,
    > > > Daniel Gormley
    > > > Visual SUN Studios
    > > >
    > > >

    > >
    > >

    >
    >
     
    Daenil of GL, Feb 25, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rudy Mark

    content expiration

    Rudy Mark, Oct 16, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    395
    Natty Gur
    Oct 16, 2003
  2. Mario Hébert

    IIS Enable content expiration and .Net objects

    Mario Hébert, Jan 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,503
  3. Replies:
    0
    Views:
    439
  4. TR
    Replies:
    0
    Views:
    567
  5. Jason Kendall

    Automatic Page Content Expiration

    Jason Kendall, Aug 1, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    463
    Jason Kendall
    Aug 1, 2005
Loading...

Share This Page