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 8364967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:33:14+00:00 2026-06-09T12:33:14+00:00

I have a HTML with following script: <script type=text/javascript> function doRefreshWithInterval() { setTimeout(doRefresh(), 60000

  • 0

I have a HTML with following script:

<script type="text/javascript">
    function doRefreshWithInterval() {
        setTimeout("doRefresh()", 60000 );
    }

    function doRefresh() {
        window.location.reload(true);
    }

    if (window.location.href.indexOf("Dashboard.jspa") >= 0) {
        doRefreshWithInterval();
    }
</script>

To make a page refresh periodically. The problem is when I scroll down the page (it is a long page), and refresh happens on some browsers (specially Firefox) the browser goes to top of the page and not where I was. Is there some way to prevent this, and make Firefox scroll down to the last position after refresh?

  • 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-06-09T12:33:15+00:00Added an answer on June 9, 2026 at 12:33 pm

    Actually, you only need to make one tiny change to your existing code. Change document.location.reload(true); to document.location.reload();.

    Using true you force the browser to get the page from the server again, which means your place on it will be lost. When you remove the true, the browser loads the page from the cache, preserving your place on the page.

    This may not be helpful, however, if the reason you’re automatically reloading the page is to get the latest version of the page that the server may have modified.

    Tested with Firebug in Firefox 12.0.

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

Sidebar

Related Questions

I have HTML which includes scripts in following order <script src=../static/js/jquery.js type=text/javascript> <script src=../static/js/bootstrap.js
I have the following code that works: <script type=text/javascript> $(document).ready(function() { // Initialise the
I have the following KnockoutJS template (render with jquery.tmpl): <script id=contactsTemplate type=text/html> <li data-bind=click:
I have the following code that works fine in IE: <HTML> <BODY> <script language=JavaScript>
I have the following file: <html> <head> <title></title> <link rel=css type=text/css href=/empty.css title=css />
Hi I have the following code: <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <title>Registration Form</title>
I have the following HTML structure: $('#subgroup a').nextUntil('h3').wrapAll('<div></div>'); <script src=https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js></script> <div id=subgroup> <h3>Group name
If I have the following html: <html> <div id=main_content> <button>click me</button> <script src=main.js ></script>
I have the following directory structure : /script/x.js /includes/x.txt /1/2/index.html After hooking a webpage
I have the following in a html.erb file: <%= @location_list = [['test',2]] %> <script

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.