aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Page is Not Refreshing as Expected Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Page is Not Refreshing as Expected" Watch "Page is Not Refreshing as Expected" New topic
Author

Page is Not Refreshing as Expected

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1490
    
    1
For some reason the following JS will not refresh the page when the window.location.href = window.location.href fires. However, if I do a right click on the page and click Refresh the page reacts okay:

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Have you tried the location object's reload() method?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1490
    
    1
Bear Bibeault wrote:Have you tried the location object's reload() method?


As usual while I am waiting for a response I keep looking for a soultion myself(still very limited on my knowledge of web developement and all its diversity). I just tried the reload() method and it worked great. What is the difference in the two ways of doing this. I have some pages where the first method I tried works fine but for some reason not in this case.

Again, thanks for the invaluable help you have been for the last few months.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Based on your browser's cache settings.

Use Fiddler and look at the difference in the requests.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Page is Not Refreshing as Expected