File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Refresh page once Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Refresh page once" Watch "Refresh page once" New topic
Author

Refresh page once

mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 243

How to refresh page once onload of the html page?
i tried using in body tag onload="window.refresh".
please help me
thanks in advance
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Why would you need to refresh the page one time at onload?

Eric
Megha kharde
Greenhorn

Joined: Nov 24, 2010
Posts: 19
I think you can use <META HTTP-EQUIV="Refresh" CONTENT="0>
which instructs a web browser to automatically refresh the current web page or frame after a given time interval, using an HTML meta element with the http-equiv parameter set to "refresh" and a content parameter giving the time interval in seconds.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Megha kharde wrote:I think you can use <META HTTP-EQUIV="Refresh" CONTENT="0>
which instructs a web browser to automatically refresh the current web page or frame after a given time interval, using an HTML meta element with the http-equiv parameter set to "refresh" and a content parameter giving the time interval in seconds.


Also creating an infinite loop of refreshing.

Eric
Megha kharde
Greenhorn

Joined: Nov 24, 2010
Posts: 19
Eric Pascarello wrote:
Megha kharde wrote:I think you can use <META HTTP-EQUIV="Refresh" CONTENT="0>
which instructs a web browser to automatically refresh the current web page or frame after a given time interval, using an HTML meta element with the http-equiv parameter set to "refresh" and a content parameter giving the time interval in seconds.


Also creating an infinite loop of refreshing.

Eric


I am a beginer in Java. I came across this use of meta refresh while studing a struts2 example from Struts2 In Action to redirect the request from an index.html page
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=Menu.action">
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60781
    
  65

And if you use it to redirect to the same page, what will happen? Again. And Again. And again.

Still waiting to hear from the original poster on what the purpose of all this is.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 243

I developed a web page after logout it when i click back button it is showing previous page.
When i try refresh the browser after logout it wont go back to previous page so,i think refresh the page once.
Is refresh the page and refresh browser will get the same result if not? Is there any other way to refresh the browser after logout?
 
Consider Paul's rocket mass heater.
 
subject: Refresh page once
 
Similar Threads
use body onload refresh functionality only once
Frames loading twice on refresh
Refresh times to be one
need a listener for onTabChange in firefox
Refresh Page In other Frame