[thelist] ASP Questions

darren darren at web-bitch.co.uk
Mon May 20 04:05:01 CDT 2002


On Sunday, May 19, 2002 Michele Foster wrote:

MF> response.buffer="TRUE"

this controls when the output is sent to the page.  as matt mentioned this
was set to 'false' by default in iis4 which meant that stuff was sent to
the page as soon as it was ready.

the upside to this is the user sees action as soon as they can.  the
downside is that if you want to redirect the user to another page halfway
through your code, you'll get a 'headers have already been sent to the
page' type error.

for best performance set this to 'true' and use response.flush if you want
to show something to the user.

MF> response.cachecontrol="PRIVATE"

i think this is trying to tell any proxies that you are handling caching
for this page and so they shouldn't.  this has a tendency of being ignored
by certain proxies.  you also might see:

   Response.AddHeader "pragma","no-cache"
   Response.AddHeader "cache-control","private"

which are also commands to proxies.

MF> response.expires="300"
MF> response.expiresabsolute=DATE+1

these two and response.cachecontrol are all 'cache buster' settings to try
and prevent the page being cached.  looks like they are trying to get the
page to be reloaded after 5 mins (response.expires="300") and just to make
sure then it's definitely expired tomorrow (response.expiresabsolute=DATE+1)

take a look at phil paxtons article on learnasp for a bit more info and
some links:

   http://www.learnasp.com/learn/cachenomore.asp

MF> Anyone have a good all-encompassing site that one can type in the
MF> "control/element" they are looking for and get a definition and various
MF> parameters?

nope, but let us know if you find one... :>

hth,

darren.




More information about the thelist mailing list