how to refresh browser automatically

  • Thread starter Pascal Schmidt-Volkmar
  • Start date
P

Pascal Schmidt-Volkmar

Hi there,

I am showing a page where settings can be done. After pressing the submit
button I do show another page with the positive message that the settings
have been saved. I also display a "Back"-button. When this one is pressed
the previous page is shown but unfortunately with the old settings. Can I
manually refresh that page and how??

Pascal
 
M

Mitja

Pascal Schmidt-Volkmar said:
Hi there,

I am showing a page where settings can be done. After pressing the submit
button I do show another page with the positive message that the settings
have been saved. I also display a "Back"-button. When this one is pressed
the previous page is shown but unfortunately with the old settings. Can I
manually refresh that page and how??

Pascal

Determining in which situation to refresh can be problematic here, not to
mention that auto-refreshing is highly unadvisable.

Try including a HTTP header (if you can configure the server, say Apache) or
a <META> tag that tell your browser not to cache the pages; this way, a
fresh version of the page will always be fetched off the server. Google for
for "http expiration" and/or "pragma no-cache".

Mitja
 
T

Toby A Inkster

Pascal said:
I also display a "Back"-button. When this one is pressed
the previous page is shown but unfortunately with the old settings. Can I
manually refresh that page and how??

You're fixing the wrong problem.

Your problem is that the page with the settings form on it is being
cached. Send a few extra HTTP headers to the browser to request that it
doesn't cache the page.
 
B

brucie

in post: <
Pascal Schmidt-Volkmar said:
I am showing a page where settings can be done.
ok

After pressing the submit button I do show another page with the
positive message that the settings have been saved.
great

I also display a "Back"-button.

why and what is wrong with the browsers back button?
When this one is pressed the previous page is shown

makes sense
but unfortunately with the old settings.

why is this unfortunate? what if the visitor changes their mind and
wants to only change one option and save again. its not nice making them
make all the selections again.

if you mean the options have not taken effect on the old page then this
is normal behavior and obvious to everyone except the most shiny new
newbie but even they should be able to understand <p>hit refresh to
enable new settings said:
Can I manually refresh that page and how??

i think you're trying to fix the wrong problem or fix a problem that
doesn't exist.
 
B

brucie

in post: <
Mitja said:
Try including a HTTP header (if you can configure the server, say Apache) or
a <META> tag that tell your browser not to cache the pages;

cache directives are easily ignored. they're not something to be relied
upon.
 
P

Pascal Schmidt-Volkmar

Hi there,

my page has this code but unfortunately, the page is not refreshed when it
is called....

<HTML>
<HEAD>
<TITLE>Meldung</TITLE><meta http-equiv="cache-control"
content="no-cache">
</HEAD>
<BODY>
<form method="POST"
action="/myisapi/WebFragebogen.dll/AktiviereFragebogen"><document.reload()><
p><b>Willkommen im Konfigurationsprogramm für den Web-Fragebogen</b></p><p>-
Bitte laden Sie den Browser neu, damit etwaige Änderungen aktualisiert
werden -</p><hr><p>Aktuell aktiver Fragebogen: EDI5 03 AMVE 1</p><p>Anzahl
der Befragten bisher: 14</p><hr><p>Auswahl des aktiven Fragebogens: <select
size="1" name="cbFragebogen"><option>EDI5 03 FLW</option><option>EDI5 03
IMGF</option><option>EDI5 03 AMVE 1</option><option>EDI5 03 AMVE
2</option><option>EDI5 03 AMVE 3</option><option>EDI5 03 AMVE
4</option><option>EDI5 03 AMVE 6</option></select></p><p><input
type="submit" value="Fragebogen aktivieren" name="bSubmit"></p></form>

Pascal
 
A

Andrew Urquhart

Pascal said:
Hi there,

my page has this code but unfortunately, the page is not refreshed
when it is called....

<HTML>
<HEAD>
<TITLE>Meldung</TITLE><meta http-equiv="cache-control"
content="no-cache">
</HEAD>
<BODY>
<form method="POST"
action="/myisapi/WebFragebogen.dll/AktiviereFragebogen"><document.reload
()><
p><b>Willkommen im Konfigurationsprogramm für den
<cut />

Is your question about the meta tag or the <document.reload()> tag or
both?

<document.reload()> is not a valid HTML tag. If you really wanted to do
that you'd write

<script type="text/javascript">
location.reload();
</script>
<noscript>
<a href="currentpage.html">Refresh this page</a>
</noscript>

and then you could enjoy the reload infinite loop in all it's glory,
whilst providing the same functionality for no javascript users if they
so wish ;-)

http://jibbering.com/faq/#FAQ4_17
--
Andrew Urquhart
- FAQ: www.html-faq.com/
- Archive: www.google.com/groups?q=alt.html
- Contact: www.andrewu.co.uk/contact/
- Employ me: Front/middle tier ASP developer with WAI & web standards
 
P

Pascal Schmidt-Volkmar

Kris,

I do see "Re: how to refresh browser automaticall" in my field??

Pascal
 
P

Pascal Schmidt-Volkmar

Andrew, I am referring to the <meta http-equiv="cache-control">. This does
not work. Whenever this page is shown, it does not refresh automatically...

Pascal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top