473,326 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

OutputCache Duration across time zones?

CJ
If I set the outputcache like this..

<%@ OutputCache Duration="900" VaryByParam="none" %>

on a server on the east coast. Will someone who hits the site on the
west coast get three hours added to the cache expiration?

it mentions at msdn that Response.Cache.SetExpires should follow UTC
and any HTTP1.1 docs that you read on w3c will say that UTC is the only
accepted format.

does asp.net set the response header according to UTC?

thanks in advance!

Jan 3 '06 #1
2 2136
"CJ" <Ch*************@gmail.com> wrote in message news:11**********************@g49g2000cwa.googlegr oups.com...
If I set the outputcache like this..

<%@ OutputCache Duration="900" VaryByParam="none" %>

on a server on the east coast. Will someone who hits the site on the
west coast get three hours added to the cache expiration?


Someone who hits the site from the Pacific coast will have the same
cache duration as someone hitting the site from Asia, and that is 15
minutes.

Yes, ASP.NET / IIS will set the HTTP header for cache expiration in
universal time (automatically adjusted from the host machine's system
time and local time zone; so if these are improperly set then the cache
duration may not be as long as you think it is). An objective time is
an example of why the HTTP protocol exists (to standardize behavior).
One can only imagine the tremendous mess the Internet would be in
were all times local.
Derek Harmon
Jan 3 '06 #2
CJ
Many thanks Derek!

I suppose that you could fool the browser cache if you had the client
time zone set incorrectly. I was having a difficulty with
understanding why any example of setting the outputcache always looks
like this..

Response.Cache.SetExpires(DateTime.Now.AddSeconds( 60));

When technically I would think that you would need to use something
like..

Response.Cache.SetExpires(DateTime.Now.ToUniversal Time().AddSeconds(60));

Anyhow.. Thanks again!

Jan 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: marshal | last post by:
Hi to All, I am using <% @ OutputCache Duration="60" VaryByParam="none" %> in my usercontrol say "myControl.ascx". This user control has a property say "title". Now am Dynamically Loading...
0
by: Vassilis T. via .NET 247 | last post by:
The following piece of code, when on a heavily loaded server (more than 50 ASP.NET pages, most using outputcache with varybyparam, lots of users), will only cache the string - the output is not...
1
by: Sudhir Sharma | last post by:
guys, I have this code in my .aspx file. <%@ OutputCache Duration="500" VaryByCustom="OrganizationID" VaryByParam="None" %> and I have overriden the method "GetVaryByCustonString()" in my...
1
by: Liming | last post by:
Hi all, A quick question on Cache. I'm not sure what I'm doing wrong. I'm testing out two pages. Page1 and Page2. Page1 click a button, redirect to page 2. on both page, i have <%@...
1
by: Amil Hanish | last post by:
I had an aspx page with output caching turned on. Then I wanted to do some other stuff and I commented it out like: <!-- <%@ OutputCache Duration="1800" VaryByParam="t" %> --> The IDE...
5
by: Arpan | last post by:
I am using the following code to cache the page output for 60 seconds: <%@ OutputCache Duration="60" VaryByParam="*" %> <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As...
3
by: craigkenisston | last post by:
Hi, I have some controls with these: <%@ OutputCache Duration="500" Shared="true" VaryByParam="None" %> However, I need that under certain user action, specifically, changing a value on a...
2
by: Nalaka | last post by:
Hi, I get the following error, I thought at random intervals. Then I realized, that this happens around the time tha page outputCache is set to expire. So I disabled the page output cache and the...
1
by: Nalaka | last post by:
I had ..... <%@ OutputCache Duration="5000" Location="Server" VaryByParam="none" %> Then I added "browser" <%@ OutputCache Duration="5000" Location="Server" VaryByParam="none"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.