[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    How to do back then reload ?
From:       Hubert Tonneau <hubert.tonneau () heliogroup ! fr>
Date:       2001-12-04 17:10:58
[Download RAW message or body]

How to move the Konqueror browser history back, then force to reload ?

With Netscape 4, it is fairly simple: you just use Javascript
  history.go(-1)
and if the page in the history is marked as non cachable (Expires: 0),
then it will be reloaded.
Ok, this is not conforming with HTTP 1.1 stating that pressing the
back button should ignore caching specification.
So, it does not work with Mozilla, neither with Konqueror.

The only thing I found to solve the problem for these is (be carefull, you'll get a headache):
. change the window name (add it a special character)
. execute the 'history.go(-1)'
. the 'onLoad' hook of each page is looking for the special character in
  the window name, then remove it and do 'window.location = window.location.href'
  in order to force reload.

The general idea is that the name of the window is the only information
that survives to an history backtrack.
This works fairly nicely with Mozilla (also I find it ugly).

On the other hand, with Konqueror I get two extra problems:
. The old fashioned page is displayed before executing the 'onLoad' hook,
  so I get a flick
. Sometime the system will infinit loop on reloading the same page instead
  of backtracking

So, my question is do we have a way to do back then reload properly with
Konqueror ?

PS: Please Cc any any answer to me since I'm not a subscriber of this mailing list.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic