473,837 Members | 1,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

strange problem possibly related to caching

Gav
Hi all,

I'm having this strange problem where, in a web app, I have 2 different
links to a different form. One is just a straight forward link the other is
a bit more complicated because it gets there from a user control I wrote to
display a menu. However both call the page in the same way using
window.open('pa ge.aspx','_top' );

The problem is that:.... The page it calls, in the page load, checks to see
if a session variable is null, if it is it shows a error message and sends
the user back. This works fine the first time you click it exactly how it
should work. however if you click the link in the menu when the var is null
I get sent back then if I click the same link when the var is not null I
still get the error message and get sent back!! however if I click the
straight forward link the page loads. Even after I have the page I can go
back manually click the link in the menu and still get the same error. When
trying to debug it doesn't when clicking the menu option which makes me
believe it has something to do with caching. Although I have;
<META http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT"> which I
believe should make it expire straight away so therefore always reload
itself.

Hope somebody can help me out? Let me know if you need more info

Regards
Gavin
Nov 15 '05 #1
4 1621
Gav,

If you are using the window.open function then a new window would be
opened by javascript. A new window has no back/forward page so I am
not sure about some part of your issue.

Since you are using the window.open function each time I am not sure
you will benefit from the cache..

Does your control generate a postback? if it does is the variable
check being done each and every time? if it is you should be able to
put a break point into the code and discover what is not firing.

Lastly, check your html code generated in each instance (first &
second clicks of the control) -- look for differences and possibly
missing html on the second click. Too often we forget that asp.net
just sets up valid html/javascript -- if that underlying code is
incorrect you can trace the cause back to the asp/c# logic.

--
~~~~~~~~~~~~~
Tommie Carter
--

"Gav" <sp**@spam.co m> wrote in message news:<#E******* *******@TK2MSFT NGP10.phx.gbl>. ..
Hi all,

I'm having this strange problem where, in a web app, I have 2 different
links to a different form. One is just a straight forward link the other is
a bit more complicated because it gets there from a user control I wrote to
display a menu. However both call the page in the same way using
window.open('pa ge.aspx','_top' );

The problem is that:.... The page it calls, in the page load, checks to see
if a session variable is null, if it is it shows a error message and sends
the user back. This works fine the first time you click it exactly how it
should work. however if you click the link in the menu when the var is null
I get sent back then if I click the same link when the var is not null I
still get the error message and get sent back!! however if I click the
straight forward link the page loads. Even after I have the page I can go
back manually click the link in the menu and still get the same error. When
trying to debug it doesn't when clicking the menu option which makes me
believe it has something to do with caching. Although I have;
<META http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT"> which I
believe should make it expire straight away so therefore always reload
itself.

Hope somebody can help me out? Let me know if you need more info

Regards
Gavin

Nov 15 '05 #2
Post your relevant code snippets, the problem is unclear to me from your
explanation.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/2bz4t
"Gav" <sp**@spam.co m> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Hi all,

I'm having this strange problem where, in a web app, I have 2 different
links to a different form. One is just a straight forward link the other is a bit more complicated because it gets there from a user control I wrote to display a menu. However both call the page in the same way using
window.open('pa ge.aspx','_top' );

The problem is that:.... The page it calls, in the page load, checks to see if a session variable is null, if it is it shows a error message and sends
the user back. This works fine the first time you click it exactly how it
should work. however if you click the link in the menu when the var is null I get sent back then if I click the same link when the var is not null I
still get the error message and get sent back!! however if I click the
straight forward link the page loads. Even after I have the page I can go
back manually click the link in the menu and still get the same error. When trying to debug it doesn't when clicking the menu option which makes me
believe it has something to do with caching. Although I have;
<META http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT"> which I believe should make it expire straight away so therefore always reload
itself.

Hope somebody can help me out? Let me know if you need more info

Regards
Gavin

Nov 15 '05 #3
Gav
This was a problem to do with caching...becau se the window.open had '_top'
in the statement it opens it in the current window instead of opening a new
one. Although I was putting the expires tag in, it was writing the
history.back in the Page_load event so it was going back a page before it
wrote the <meta> tag into the page. Just had to make sure I wrote that
first.

Thanks for the help

"Alvin Bruney" <vapor at steaming post office> wrote in message
news:%2******** **********@tk2m sftngp13.phx.gb l...
Post your relevant code snippets, the problem is unclear to me from your
explanation.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/2bz4t
"Gav" <sp**@spam.co m> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Hi all,

I'm having this strange problem where, in a web app, I have 2 different
links to a different form. One is just a straight forward link the other is
a bit more complicated because it gets there from a user control I wrote

to
display a menu. However both call the page in the same way using
window.open('pa ge.aspx','_top' );

The problem is that:.... The page it calls, in the page load, checks to

see
if a session variable is null, if it is it shows a error message and sends the user back. This works fine the first time you click it exactly how it should work. however if you click the link in the menu when the var is

null
I get sent back then if I click the same link when the var is not null I
still get the error message and get sent back!! however if I click the
straight forward link the page loads. Even after I have the page I can go back manually click the link in the menu and still get the same error.

When
trying to debug it doesn't when clicking the menu option which makes me
believe it has something to do with caching. Although I have;
<META http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">

which I
believe should make it expire straight away so therefore always reload
itself.

Hope somebody can help me out? Let me know if you need more info

Regards
Gavin


Nov 15 '05 #4

Hi Gav,

Is your problem resolved?
I think Tom Carter's post provide some useful information to you.
If you still have any concern, please feel free to tell me.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #5

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

Similar topics

4
1470
by: Tomasz Lisowski | last post by:
Hi, We are distributing our Python application as the short main script (.py file) and a set of modules compiled to the .pyc files. So far, we have always treated .pyc files as portable between platforms, but recently we have discovered an annoying problem. In a module, there is the following code fragment: Deg2Rad = math.pi/180.0 angleEPS = 0.5
9
2210
by: Wescotte | last post by:
Here is a small sample program I wrote in PHP to help illustrates problem I'm having. The data base is using DB2 V5R3M0. The client is WinXP machine using the iSeries Client Access Driver ver 10.00.04.00 to connect to the database. The problem is that executing the exact same SQL select statement more than twice int a row stops produces results. The first two instances will always produce the correct results but after that it will simply...
8
1706
by: Ondine | last post by:
Hi I have a client running an Access 2000 database on a small network with 3 pc's. Two of the laptop pcs have a data replica, which they use when not connected to the network, the 'server' being the 3rd machine. The other day they reported that 'suddenly' a whole load of data that they had entered (on to the 'server' main data) that day had 'disappeared'. Not only had the new data gone, but updates performed
1
1099
by: big DWK | last post by:
Hi- We're having a strange caching problem with an ASP.Net app written in VB.Net on Windows 2003 with all the updates. We have two websevers that use a common sql backend and a session server to preserve state. Everything is working on one server, on the second one we have one page that is giving us problems. Basically we changed the ip of our mail server and updated the pages that use it accordingly. One page, however isn't reading...
1
1229
by: Mike Trebilcock | last post by:
I have a web app that builds a tree from a database. The tree is built on demand when the user POSTs the page back to the sever. The server maintains a copy of the current tree in a session object. This all works fine on the development server but I have a problem on my live server (IIS6.0 ASP.NET 1.1). When the user posts the page back the request is not getting to ASP.NET. When tracing is enabled there is no entry. However the...
2
1718
by: spied | last post by:
i get this error messages in my application: query error: ERROR: duplicate key violates unique constraint "pg_type_typname_nsp_index" failed query: SELECT packv_uid INTO TEMPORARY my_new_to1c FROM new_to1c connection error: no connection to the server it's my code: for (;;) { doquery("begin work");
7
1291
by: Rob Meade | last post by:
Hi all, I have a web application which gets *very* few hits, especially as its only just been launched, but even after that it'll be a "quiet" site. My problem is that when I am the first person to visit it for the day (like this morning) it takes much longer to load - my understanding (having attended a MS asp.net course some time ago) was that this is because its doing the recompile to MSIL (please correct me if I'm wrong). I...
10
2346
by: John Kraft | last post by:
Hello all, I'm experiencing some, imo, strange behavior with the StreamReader object I am using in the code below. Summary is that I am downloading a file from a website and saving it to disk for further parsing. I know, I could use the WebClient and it would be easier, but I don't have the flexibility I want with it. This code appears to work exactly the way I want unless the user cancels the the background operation. In that...
0
869
by: Susan | last post by:
..net 2.0 - I've been getting a very strange error on my websites I can't track down. It only happens occasionally, and continues until IIS is reset. The error happens on line 10: Dim product As Product = LoadProduct(row.Row) It looks like row.Row is not being found in the view We're caching the data - could this be related to the cache being
0
9685
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
10886
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
10580
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10277
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9413
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
7007
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
5674
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
5853
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4479
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

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.