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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:18:15+00:00 2026-05-26T09:18:15+00:00

Hope someone has a good answer to this: Why does Chrome (14.0) triggers the

  • 0

Hope someone has a good answer to this:

Why does Chrome (14.0) triggers the document ready and window load events when I refresh the page? Note that I am not talking about what happens when the new page loads, but before it has loaded. See the following code:

<form name="form1" method="post" action="tmp.aspx?a=1" id="form1">
<script type="text/javascript">

    $(document).ready(function () { console.log('document/ready' + new Date()); });

    $(window).load(function () { console.log('window/load' + new Date()); });

</script>

<a href="tmp.aspx?a=1">tmp</a>
</form>

When I first visit page I get two outputs on console, one for document/ready and one for window/load. When I refresh page two more are quickly output, and instantly after that two more (from new page view). If I instead just click the link (tmp.aspx) which goes directly back to same page, this does not happen.

I am sure there is a good explanation for this.

EDIT:
The additional calls to $(document).ready() and $(window).load() are made BEFORE that page has refreshed. So when I first load the page they methods are called once, then I hit refresh and BEFORE the page has reloaded the methods are called again. After that, when the page just have been reloaded, the methods are called a THIRD time.

  • 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-26T09:18:16+00:00Added an answer on May 26, 2026 at 9:18 am

    Behavior observed on 14.0.835.202. edit : (on Windows Seven x64)

    It’s not the jquery fault : The DOMContentLoaded is fired another time just before page unload.

    Simple test to check this :

     function startpage() {   
         console.log('page loaded');
       }   
    
       function unloadPage(){
           console.log("page unloaded");
       }
    document.addEventListener("DOMContentLoaded", startpage, false);
    window.onbeforeunload = unloadPage;
    

    You should see after a refresh:

    page loaded
    page loaded // should not be here and is not on Firefox.
    page unloaded
    loaded
    

    In your console (with persistence on)

    I think it’s simply a Chrome bug. Not a console one, as timestamping proves it’s not a duplicate.

    Edit : the same Chrome version but running OSX seems ok (see comment below). It tends to confirm that it’s a bug.

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

Sidebar

Related Questions

Hope someone has an easy answer on this. I have a header image which
I have a very weird problem.. I really do hope someone has an answer
I hope someone has the patience to look at this..... I have a flash
I really hope someone has some insight into this. Just to clarify what I'm
I have a question about this error and hope someone has ran into it
This is a very specific question. I hope there's someone here with good knowledge
Greetings, I hope someone has the patience to read this. I have a setup
I hope someone could help me on this. I want to add a month
I hope someone can help me with this, as I'm unable to find the
Hi and good evening, hope someone can help. I am trying to get some

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.