This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 1393
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: 60785
    
  65

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: 1393
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
 
 
subject: Page is Not Refreshing as Expected
 
Similar Threads
Checking for load finished
File Upload Issues
how to use ajax
Refresing Calling Page
Keep Focus on Current Window