473,406 Members | 2,439 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,406 software developers and data experts.

why browser cache setting affects program behavior? Fix?

Hi All,

I am working on a project that acts as a bridge. It does some checking with
post xml data, and then redirects the request to an appropriate page.
However, we find that depends on the browser cache setting (and OS), the
program behaves differently.

This is how it should work:
1. The client program opens a webbrowser control, using navigate2 method to
post xml data to my aspx pages, eg abc.aspx
2. My aspx pages process the requests, setup cookies in order for a
successful redirect to another page ( eg. xyz.asp) on the servers.
3. I have a hidden hyperlink on the aspx page, and after processing, use
JavaScript to link.click the hyperlink and do the redirect.
4. The client browser displays the appropriate page (xyz.asp).

However, we run into problems. For most of the OS and IE settings, IE Cache
setting needs to the default setting -- Automatically check newer versions of
stored page. Otherwise if the cache setting is set to check for every visit,
the redirect will not work, and instead it post back to the page (abc.aspx)
instead of going to xyz.asp page. This results into empty post data scenario.

We also encountered that the IE cache setting has to be set to check for
every visit in order for it to behave properly.

It seems the problem is somewhat related to IE cache setting, and maybe
somehow, we may be able to disable the auto posting back to the page itself
in my aspx page.

We will need to have the hyperlink so that when we do a redirect to another
page, so cookie will be set for xyz.asp page. (response.redirect and
server.transfer are not reliable for setting cookies)

My questions are:
1. What does the browser do under each option in the cache setting? Why
would it affect the program so?
2. Is there a way to disable the form post back to itself, how?
3. If your suggestion is to get rid of the server side hyperlink, what is
the alternative for redirecting with cookie working?

Thanks much,
Junlia

Nov 19 '05 #1
2 2550
1) if you use server.treansfer, you don't need a cookie, get the data you
pass in the cookie from the posting page

2) if you want the link to work, when render append a random number or guid
to the url (ex xyz.asp?n=16546565656). this make the url unique, so the
cache will not be used.

-- bruce (sqlwork.com)
"junlia" <ju****@discussions.microsoft.com> wrote in message
news:36**********************************@microsof t.com...
Hi All,

I am working on a project that acts as a bridge. It does some checking
with
post xml data, and then redirects the request to an appropriate page.
However, we find that depends on the browser cache setting (and OS), the
program behaves differently.

This is how it should work:
1. The client program opens a webbrowser control, using navigate2 method
to
post xml data to my aspx pages, eg abc.aspx
2. My aspx pages process the requests, setup cookies in order for a
successful redirect to another page ( eg. xyz.asp) on the servers.
3. I have a hidden hyperlink on the aspx page, and after processing, use
JavaScript to link.click the hyperlink and do the redirect.
4. The client browser displays the appropriate page (xyz.asp).

However, we run into problems. For most of the OS and IE settings, IE
Cache
setting needs to the default setting -- Automatically check newer versions
of
stored page. Otherwise if the cache setting is set to check for every
visit,
the redirect will not work, and instead it post back to the page
(abc.aspx)
instead of going to xyz.asp page. This results into empty post data
scenario.

We also encountered that the IE cache setting has to be set to check for
every visit in order for it to behave properly.

It seems the problem is somewhat related to IE cache setting, and maybe
somehow, we may be able to disable the auto posting back to the page
itself
in my aspx page.

We will need to have the hyperlink so that when we do a redirect to
another
page, so cookie will be set for xyz.asp page. (response.redirect and
server.transfer are not reliable for setting cookies)

My questions are:
1. What does the browser do under each option in the cache setting? Why
would it affect the program so?
2. Is there a way to disable the form post back to itself, how?
3. If your suggestion is to get rid of the server side hyperlink, what is
the alternative for redirecting with cookie working?

Thanks much,
Junlia

Nov 19 '05 #2
thanks for the suggestions, Bruce,

Response.redirect and server.transfer just don't work well with cookies. so
option 1 would not work. We will have to use cookies to get it work.
otherwise, we will have to change the xyz.asp page, which is way too much
work.

the problem we have here seems to be that the aspx page post back to itself,
instead of redirecting to the link. We don't want the form post back to
itself.

Junlia

"Bruce Barker" wrote:
1) if you use server.treansfer, you don't need a cookie, get the data you
pass in the cookie from the posting page

2) if you want the link to work, when render append a random number or guid
to the url (ex xyz.asp?n=16546565656). this make the url unique, so the
cache will not be used.

-- bruce (sqlwork.com)


Nov 19 '05 #3

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

Similar topics

9
by: Cyrus D. | last post by:
Hi guys, Let's say I have a page that is primarily HTML but I added a few small parts that are PHP, for example a random banner. The page is in no way PHP driven, it just has some some random...
0
by: pargat singh | last post by:
Hi Everyone, I have a log file like 123.log and i want to display this log in browser.In ASP page at top i have following. <%Response.Buffer = true;%> <%Response.Expires = -1%> Inside page...
3
by: Sergey Surkov | last post by:
Hello Does anybody know how to make FireFox to cache data that comes via XMLHttpRequest? Here is the issue I deal with: - On the web server (apache2) I have a static xml file test.xml - When I...
6
by: Tom Kiefer | last post by:
Question: If I have an ASP.NET User Control which defines/exposes a property that the page can use to specify a mode or data subset for the control to use, is there a way to tell the @OutputCache...
5
by: David Baker | last post by:
Hi all I am very new to ASP.Net. I am trying to create a sniffer for our program. We want our users to click our sniffer and hopefully the sniffer will check their computer against our...
0
by: NormD | last post by:
We are wondering how the cache gets used and reused as DLLs are brought in to it. I did some timing traces starting with a cleared cache. As forms (individual DLLs) were accessed the first time...
21
by: nsimeonov | last post by:
Hello, Does anyone have any idea how Gmail does this? I have a web application and people complain sometimes about some problems and most of the time it turns out it's the browser's cache...
11
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some pages that must not be cached on the client. In ASP.NET 1.1 I achieved this using metatags: <meta...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.