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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:44:39+00:00 2026-06-17T21:44:39+00:00

I want to know if it’s possible to know if a user has let

  • 0

I want to know if it’s possible to know if a user has let a page to load or he has clicked the X from Chrome or Firefox to stop it perfoce.

I have this code:

jQuery(window).load(function () {
if (condition == 1){
...
else
...

If user let to load the website until the end, first condition will comply.

If user forces to stop the loading, second condition will comply.

  • 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-17T21:44:40+00:00Added an answer on June 17, 2026 at 9:44 pm

    If user clicked X then that means most likely he didn’t load the jQuery library, or your code…

    If you want check if the page is fully loaded then there is a trick that might help…

    Put a div at the end of the page and bind the events to it when it’s ready

    jQuery('.div-trick').load(function () {});
    

    Edit: more over you can place your jQuery code at the end of the page…

    Note : don’t forget don’t wrap your code with document ready because then it wont be fired…

    Edit : hmm, I guess my ultimate solution is to do this …

    function loadchecker() {
        if($('.div-trick').length<0){
            alert('page is not fully loaded');
        } else {
            alert('now the page is loaded')
        }
    }
    
    // fast counter is an over kill but it wills stop when the page is loaded
    var checker = window.setInterval(loadchecker, 5);
    
    //then on my documnet ready i will            
    $(function(){
         clearInterval(checker);
    });
    

    Pretty dirty solution but what can i say this is all what can be done as far as i know…

    As for your last comment, why do you want to check if he didn’t load the page ! all you need to do is check if the page is loaded and give him the prize

    $(function(){
        // page is fully loaded
        // you will get the prize
    
    });
    

    or bind the ajax call on the load of the image or the add that you want… as shown above…

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

Sidebar

Related Questions

i want know if is possible, to get a specific element value of a
i want know if it's possible detect and delete a date in string format
i want know if it's possible create a custom delegate in the AppDelegate class,
I want know when all thread has been finished in a multithread program without
i want know how i can send one mail to 200 user and i
I want know if its possible to make a loop purely in CSS (obviously
Hi i want know how to compare the height with other user height here
Possible Duplicate: Sort multidimensional array by multiple keys I want know how I can
I want know is it possible to create akka actor in eclipse java projects
i want know how i can manage multiple twitter account on iOS in my

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.