Refresh question Firefox vs IE

M

MikeR

I'm creating a table in a form, dynamically, as below. If I edit one of the text
boxes and then click the reload button in Firefox, the text box I edited keeps the
change, rather than reloading the value from the database. How can I make it reload?
If I click the Reset button of the form, it does revert.

IE acts as I would expect.

Thanks, Mike

<table border="1" cellpadding="0" cellspacing="1" style="border-collapse: collapse"
bordercolor="#0000FF" width="40%">
<%Do while not CRS.EOF%>
<%ConnTemp.GetLog SanCall, CRS("Cid"), LogRS
If not LogRS.EOF and not LogRS.BOF then
LArray = LogRS.GetRows
for ACtr = 0 to Ubound(LArray,2)
response.write "<tr><td width='" & "60%" & "'>"
response.write CRS("CID") & " - " & CRS("LName") & " - " & CRS("CQ_Zone")
response.write "</td><td width='" & "20%" & "'>"
response.write "<input type='text' name='T1' size='20' value='" &
LArray(1,ACtr) & "'>"
response.write "</td>"
Next
response.write "</tr>"
Else
response.write "<tr><td width='" & "60%" & "'>"
response.write CRS("CID") & " - " & CRS("LName") & " - " & CRS("CQ_Zone")
response.write "</td><td>"
response.write "<input type='text' name='T1' size='20'>"
response.write "</td></tr>"
End If
%>
<%LogRS.Close
CRS.MoveNext
Loop%>
</table>
 
A

Anthony Jones

MikeR said:
I'm creating a table in a form, dynamically, as below. If I edit one of
the text boxes and then click the reload button in Firefox, the text box I
edited keeps the change, rather than reloading the value from the
database. How can I make it reload? If I click the Reset button of the
form, it does revert.

IE acts as I would expect.

Thanks, Mike

<table border="1" cellpadding="0" cellspacing="1" style="border-collapse:
collapse" bordercolor="#0000FF" width="40%">
<%Do while not CRS.EOF%>
<%ConnTemp.GetLog SanCall, CRS("Cid"), LogRS
If not LogRS.EOF and not LogRS.BOF then
LArray = LogRS.GetRows
for ACtr = 0 to Ubound(LArray,2)
response.write "<tr><td width='" & "60%" & "'>"
response.write CRS("CID") & " - " & CRS("LName") & " - " &
CRS("CQ_Zone")
response.write "</td><td width='" & "20%" & "'>"
response.write "<input type='text' name='T1' size='20' value='"
& LArray(1,ACtr) & "'>"
response.write "</td>"
Next
response.write "</tr>"
Else
response.write "<tr><td width='" & "60%" & "'>"
response.write CRS("CID") & " - " & CRS("LName") & " - " &
CRS("CQ_Zone")
response.write "</td><td>"
response.write "<input type='text' name='T1' size='20'>"
response.write "</td></tr>"
End If
%>
<%LogRS.Close
CRS.MoveNext
Loop%>
</table>

I find this little bit of 'Helpfullness' from FF bizarre. I can't imagine
why anyone would want to Refresh a form whilst it has unsubmitted data and
want or expect the content to remain.

However there is nothing you can do about it. If you are delivering a UI for
public consumption you should design your app with this potential behaviour
in mind.
 
M

MikeR

Anthony said:
I find this little bit of 'Helpfullness' from FF bizarre. I can't
imagine why anyone would want to Refresh a form whilst it has
unsubmitted data and want or expect the content to remain.

However there is nothing you can do about it. If you are delivering a UI
for public consumption you should design your app with this potential
behaviour in mind.
Thanks, Anthony -
I was hoping for a magic <meta Cache-action="ActLikeIE"> :-}
 
M

Martin Honnen

MikeR said:
I'm creating a table in a form, dynamically, as below. If I edit one of
the text boxes and then click the reload button in Firefox, the text box
I edited keeps the change, rather than reloading the value from the
database. How can I make it reload?

Use Shift-Reload.
 
D

Dave Anderson

MikeR said:
AHA! Thanks.

CTRL+F5 is the keyboard equivalent to Shift+[Refresh Button] in Firefox. The
regular refresh (F5) sends this header:

Cache-Control: max-age=0

When you use CTRL+F5 (or Shift+Refresh), Firefox sends these headers:

Pragma: no-cache
Cache-Control: no-cache

This can be especially useful when you are trying to bypass a caching proxy,
FWIW.
 
M

MikeR

Dave said:
MikeR said:
AHA! Thanks.

CTRL+F5 is the keyboard equivalent to Shift+[Refresh Button] in Firefox.
The regular refresh (F5) sends this header:

Cache-Control: max-age=0

When you use CTRL+F5 (or Shift+Refresh), Firefox sends these headers:

Pragma: no-cache
Cache-Control: no-cache

This can be especially useful when you are trying to bypass a caching
proxy, FWIW.

Thanks, Dave. If there was just some way to do that in code......
HNY
 
A

Anthony Jones

Dave Anderson said:
MikeR said:
AHA! Thanks.

CTRL+F5 is the keyboard equivalent to Shift+[Refresh Button] in Firefox.
The regular refresh (F5) sends this header:

Cache-Control: max-age=0

When you use CTRL+F5 (or Shift+Refresh), Firefox sends these headers:

Pragma: no-cache
Cache-Control: no-cache

This can be especially useful when you are trying to bypass a caching
proxy, FWIW.

Which version of IE did you discover this with?

In IE6 and 7 a regular F5 just sends the additional header:-

pragma: no-cache

Neither 6 nor 7 use

Cache-Control: max-age=0;

in the request.

What makes Ctrl+F5 different is that the request does not contain any
Last-Modified or If-None-Match headers. This would require that request (at
least to the nearest proxy server) cannot be satisfied with 304 status, the
response must contain an entity body.
 
A

Anthony Jones

Anthony Jones said:
Dave Anderson said:
MikeR said:
Use Shift-Reload.

AHA! Thanks.

CTRL+F5 is the keyboard equivalent to Shift+[Refresh Button] in Firefox.
The regular refresh (F5) sends this header:

Cache-Control: max-age=0

When you use CTRL+F5 (or Shift+Refresh), Firefox sends these headers:

Pragma: no-cache
Cache-Control: no-cache

This can be especially useful when you are trying to bypass a caching
proxy, FWIW.

Which version of IE did you discover this with?

In IE6 and 7 a regular F5 just sends the additional header:-

pragma: no-cache

Neither 6 nor 7 use

Cache-Control: max-age=0;

in the request.

What makes Ctrl+F5 different is that the request does not contain any
Last-Modified or If-None-Match headers. This would require that request
(at least to the nearest proxy server) cannot be satisfied with 304
status, the response must contain an entity body.

Edit: Last-Modified => If-Modified-Since
 
E

Evertjan.

Anthony Jones wrote on 30 dec 2008 in
microsoft.public.inetserver.asp.general:
Edit: Last-Modified => If-Modified-Since

But the Last-Modified date/time of any asp-rendered page is NOW,
I seem to remember
 
A

Anthony Jones

Evertjan. said:
Anthony Jones wrote on 30 dec 2008 in
microsoft.public.inetserver.asp.general:


But the Last-Modified date/time of any asp-rendered page is NOW,
I seem to remember

Dynamically generated content from ASP will not contain a Last-Modified
header at all unless specifically included by code in the ASP file.
 
M

MikeR

Martin said:
location.reload(true)
Thanks Martin -
I see how to use it in an onclick event, ot with a timer, but not how to change the
way the page reacts to having the browser Reload button clicked. Can you expand your
answer?
 
M

Martin Honnen

MikeR said:
I see how to use it in an onclick event, ot with a timer, but not how to
change the way the page reacts to having the browser Reload button
clicked. Can you expand your answer?

I don't think script embedded in a HTML document can change the way the
browser buttons like reload work.
location.reload(true)
is code to reload the document programmatically the same way as pressing
shift-reload does but it was not meant as a suggestion to change the
browser reload button.
 
D

Dave Anderson

Anthony Jones said:
CTRL+F5 is the keyboard equivalent to Shift+[Refresh Button]
in Firefox... ^^^^^^^^^^

...When you use CTRL+F5 (or Shift+Refresh), Firefox sends...
^^^^^^^^^^^^^

Which version of IE did you discover this with?

Firefox.
 
M

MikeR

Martin said:
I don't think script embedded in a HTML document can change the way the
browser buttons like reload work.
location.reload(true)
is code to reload the document programmatically the same way as pressing
shift-reload does but it was not meant as a suggestion to change the
browser reload button.
OK. Thanks.
 
S

StuWood

I don't know how dead this thread is, but can't you just 'click' the
refresh button 'onload' of the document?
as in:

<body onload="document.forms[0].refreshBtn.click()">

...or some such.

Personally I like the way Firefox does it... there's a button there to
refresh it if that's what I want to do, but it doesn't lose all my
entered data by default - it's easier to take away than it is to
re-enter it all...

Cheers
 
E

Evertjan.

StuWood wrote on 22 jan 2009 in microsoft.public.inetserver.asp.general:
I don't know how dead this thread is, but can't you just 'click' the
refresh button 'onload' of the document?

I don't know why you think it is ASP related.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top