wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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

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

Joined: Nov 08, 2001
Posts: 15376
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.

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.
It is sorta covered in the JavaRanch Style Guide.
subject: Forcing a page reload (server side)
Similar Threads
i refresh after an onchange event on a combobox and i need the parameters in request
How to reload a page on client machine at some server(context) event?
an online game ??
how to remove history from jsp pages
how to reload page