Stored pages problem

OnTheAnvil

Regular
Joined
Nov 4, 2003
Messages
92
Location
Columbus, Ohio, USA
Currently I'm using modal dialog to prompt the user for information. I use these because I can't trust my users to enter information within a standard popup because if it gets lost in the background they'll forget about it. Anyway in order to get the modal dialog to work properly I had to set "SmartNaviagtion = True". But now if the user has the "Check for newer versions of stored pages" option in IE set to anything other then "Every Visit to the Page" it reloads old data in the modal dialog if they open it more then once. To find this option go to Tools->Internet Options->Settings.

They use this modal dialog a lot because it is the primary way that they enter information into a grid on another page. But what happens when they view this page is the PageLoad event never fires on the server side because their computer (client-side) loads the page from the clients memory.

My question: Is their anyway to force internet explorer to load the page from the server even if the "Every visit to the Page" is not set?

Thanks
 
This is a known problem with modal popup windows.

I found that this resolved the problem for me.

Put the following in the head section of the html:

<META http-equiv=Pragma content=no-cache>
<META http-equiv=Expires content=-1>

Now you would think that the above (which states that the page should never cache) would work!! well it doesn't. The reason it doesn't work is that IE uses a 64kb buffer and once this is full, it clears with the above meta tags. The problem is, because the meta tags are in the head, there is no data in the page cache when IE reads these lines, therefore, the page is cached as normal. damn thing!!!

To resolve this, leave the above meta tags in the head section but also add the following code to the bottom of the page:

<head>
<META http-equiv=Pragma content=no-cache>
<META http-equiv=Expires content=-1>
</head>

Yes, I know that seems strange, but believe me, it works!!

The only problem with having two head sections in the html is that some designers (I use visual studio.net) now wont allow you to view the design, so if you do need to view the page design, comment these lines out, change the design, then remove the comments and save.

Sorted!!!
 
Thanks for the reply. How silly of me to have overlooked so easy of a solution ;) . Please note the huge amount of sarcasm. I haven't tried to implement it yet but I'll let you know how it goes.

Thanks,
OnTheAnvil
 
Back
Top