aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Forcing a page reload (server side) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Forcing a page reload (server side)" Watch "Forcing a page reload (server side)" New topic
Author

Forcing a page reload (server side)

Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
Ok... here's the deal. I'm looking to have a web page reload its content from the server no matter what. If the usr comes in for the first time, it obviously goes to the server for data, and displays it. I'm also looking to do this if the user ends up using the back button. I want the page to reload the page from the server side. This will force the page state to be correct. Any ideas in how to do this.


By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Only thing you have is to use no-cache headers on the page, but it probably will not fetch the data with the back button.

You could try to implement some JavaScript detection, but that is very iffy.

Eric
Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
I work w/a software package from PlanView Inc. that ends up doing this. Not sure how they accomplish this. I was possibly considering putting a javascript page in front of the real page. This javascript page woule redirect to the action which would inturn doing a server call. Not sure if this would work or not.
 
Consider Paul's rocket mass heater.
 
subject: Forcing a page reload (server side)