Forums Register Login

response.addHeader() method

+Pie Number of slices to send: Send
inside the dopost() method of a servlet i have a line

response.addHeader("refresh","1");

what does the above code mean?
+Pie Number of slices to send: Send
Hi,

It will auto refresh your page on submit after every 1 second time duration.


Cheers!!!
+Pie Number of slices to send: Send
When the browser will see that header, the page will be refreshed after 1 second. I won't say every 1 seconds as the next time it is up to the servlet to add that header or not. See more details on this page...
+Pie Number of slices to send: Send
Even i think its Refreshing the page in the client-Browser
+Pie Number of slices to send: Send
Looking through the RFC 2616 for HTTP1.1 I dont see a "refresh" header defined for responses so this would depend on non standard browser behavior. See the link Ankit gave for the Meta alternative.
Bill
Are you here to take over the surface world? Because this tiny ad will stop you!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3359 times.
Similar Threads
Use of .setHeader() and .addHeader() methods
expired problem in jsp (back button/link)
Doubt regarding Headers
Stop caching of an image
Submit and Excel buttons and my Jsp
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 09:16:09.