Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Re: content expiration? (http://www.velocityreviews.com/forums/t73894-re-content-expiration.html)

Daenil of GL 02-25-2004 09:31 AM

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

"Teemu Keiski" <joteke@aspalliance.com> wrote in message
news:eMniTM3%23DHA.1956@TK2MSFTNGP10.phx.gbl...
> 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.No Cache)
>
> --
> 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:103ocb6cmsilb27@corp.supernews.com...
> > 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 02-25-2004 10:21 AM

Re: content expiration?
 
Here is what i have tried and it doesnt work:

<%@ outputcache duration="60" varybyparam="None" %>
<% Response.Cache.SetCacheability(HttpCacheability.No Cache) %>
<% 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%23DHA.2184@TK2MSFTNGP12.phx.gbl...
> Thank you for your reply.
> On the Response.Cache.SetCacheability(HttpCacheablility.N ocache), would

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

the
> part that loses me.
>
> "Teemu Keiski" <joteke@aspalliance.com> wrote in message
> news:eMniTM3%23DHA.1956@TK2MSFTNGP10.phx.gbl...
> > 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.No Cache)
> >
> > --
> > 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:103ocb6cmsilb27@corp.supernews.com...
> > > 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
> > >
> > >

> >
> >

>
>





All times are GMT. The time now is 05:30 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.