Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5964105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:22:17+00:00 2026-05-22T19:22:17+00:00

How can I reload an HTML base web page only once? I am using

  • 0

How can I reload an HTML base web page only once? I am using history.go(0); with function onLoad in body tag but i want to run it only once. Please keep in mind that I am using iframe so this is not possible to to use the below types code:

<script language=" JavaScript" ><!--
function MyReload()
{
window.location.reload();
}
//--></script>

<Body onLoad=" MyReload()" > 

The above code did not work for me.

However the code below is working well but the problem is that I need it to load only once:

<BODY BGCOLOR=#FFFFFF background="../images/Index_04.jpg" onLoad="history.go(0)" >

Note: I am using two iframes when user click on main page link a page loads in iframe then I want to reload the whole page with current iframe page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:22:18+00:00Added an answer on May 22, 2026 at 7:22 pm

    You could use a querystring at the end of the page url (e.g. ?r), and check for it before redirecting, as if it exists, the redirect is already done.

    if(window.location.href.substr(-2) !== "?r") {
      window.location = window.location.href + "?r";
    }
    

    Disclaimer: I agree with others that you probably have a better solution – and should never need to refresh ‘just once’.

    Explanation of use

    At the bottom of your page, just above the </body> you should put this:-

    <script type="text/javascript">
       if(window.location.href.substr(-2) !== "?r") {
          window.location = window.location.href + "?r";
        }
    </script>
    

    That’s it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way that I can force a page to reload, but only
HTML <body onload=JavaScript:timedRefresh(10000);> <input type=checkbox checked=checked name=autoRefreshCheckboxes >Auto Refresh</input> </body> JS function timedRefresh(timeoutPeriod) {
Hey can any one suggest for web view. I have html string which has
I'm trying to reload the contents of div tag on button-click. I can do
I update the html in a webView using loadData() followed by a reload(). I
Consider the following html page, which can load in many large png files: <html>
Can you please tell me how I can reload a windows form without closing
Can I reload iframe (say __tree_iframe) from another child iframe (__content_iframe)? Difficulty: IE6/7. UPDATE
Can a LINQ enabled app run on a machine that only has the .NET
Is there a way to force a client's cache to reload an HTML file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.