473,748 Members | 6,034 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OutputCache Duration across time zones?

CJ
If I set the outputcache like this..

<%@ OutputCache Duration="900" VaryByParam="no ne" %>

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 2173
"CJ" <Ch************ *@gmail.com> wrote in message news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
If I set the outputcache like this..

<%@ OutputCache Duration="900" VaryByParam="no ne" %>

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(Date Time.Now.AddSec onds(60));

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

Response.Cache. SetExpires(Date Time.Now.ToUniv ersalTime().Add Seconds(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
2269
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 this control in "myPage.aspx" like this
0
295
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 cached, as if the outputcache is ignored. There is available RAM on the server. Other pages are cached as expected. On the development environment and on a test server, it works fine. Are there any limitations to the .NET caching, apart from RAM...
1
2095
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 global.asax.cs file. whenever the organization is changed for the Page, it should invalidate the Cache and show the new information based on the organization. it is not doing that. I put the breakpoints in the code.It is hitting the...
1
2387
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 <%@ OutputCache Duration="1" Location="None" VaryByParam="none" %>
1
1278
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 correctly shows this as a green comment...but don't be fooled. .NET still processes and caches the output. In my case, the ClientID values started being duplicated for a DataList object.
5
2162
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 EventArgs) lblOutput.Text = "Welcome, " & Request.Params("id") & " The time now is " & DateTime.Now.ToString("T") End Sub </script>
3
3011
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 dropdownlist with auto-postback, the cache for the control be cleaned and the content regenerated. Is there a way to do this ?
2
2680
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 problem went away. I put in the outputcache back and the problem is back. I am using forms authentication... and asp.net 2.0. Have you seen this problem before... any help is deeply appreciated.
1
4875
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" VaryByCustom="browser" %> After I added browser... it stopped caching pages.... is there an explanation or... did I observe the problem wrong?
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8242
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.