window.location.reload

A

Aaron Fude

Hi,

When

window.location.reload(true);

is executed, is the browser supposed to take notice of the fact that
the content type may have changed (say, from text/html to image/jpeg)
and that the new content should be handled differently? If the answer
is "yes", does Internet Explorer follow this rule?

Thanks!

Aaron


PS: This is an unrelated question. I sometimes post a pdf file on my
website, but I forget to set the permissions, so the user gets a
"cannot view this file" message. When I am notified, I fix the
permissions, but when the user hits Refresh, they get raw pdf instead
of having Acrobat open the file. In some cases they need to hit Ctrl-
Refresh and in other cases they need to close the browser and open it
again. I'm assuming it's a browser issue that I have no control over
(except for setting permissions correctly the first time). I don't
really have a question here.
 
A

Aaron Fude

As a quick follow up, the problem that I described only occurs with
IExplorer and not with any other browsers.

Thanks
 
E

Evertjan.

Aaron Fude wrote on 18 jul 2008 in comp.lang.javascript:
As a quick follow up, the problem that I described only occurs with
IExplorer and not with any other browsers.

??

[please always quote on usenet,
not all news servers receive in strict order]
 
T

Thomas 'PointedEars' Lahn

Aaron said:
When

window.location.reload(true);

is executed, is the browser supposed to take notice of the fact that
the content type may have changed (say, from text/html to image/jpeg)
and that the new content should be handled differently?

Yes, because `true' means that a potentially cached version should not be
used. However, this is a proprietary method called on a (proprietary) host
object. Another DOM API does not need to implement the method and the
object the same way the NN4 DOM (then specified in Client-Side JavaScript
1.3) did, in order to be standards-compliant.
If the answer is "yes", does Internet Explorer follow this rule?

I don't know, and it is unknown which of the numerous versions of MS
Internet Explorer (and uses of the MSHTML component in other browsers) you
are referring to. So you should set up a test case and see for yourself.
Please report your findings here then.


PointedEars
 
T

Thomas 'PointedEars' Lahn

Aaron said:
As a quick follow up, the problem that I described only occurs with
IExplorer and not with any other browsers.

Which version(s) have you tested with on which operating systems on which
platforms? (The unforged navigator.userAgent strings would suffice for an
answer.)


PointedEars
 
A

Aaron Gray

Aaron Fude said:
Hi,

When

window.location.reload(true);

is executed, is the browser supposed to take notice of the fact that
the content type may have changed (say, from text/html to image/jpeg)
and that the new content should be handled differently? If the answer
is "yes", does Internet Explorer follow this rule?

Why not use cookies for state and try :-

window.location.href = http://www.whereever.com/whatever";

Aaron
 

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

No members online now.

Forum statistics

Threads
474,142
Messages
2,570,818
Members
47,362
Latest member
eitamoro

Latest Threads

Top