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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:29:57+00:00 2026-05-30T04:29:57+00:00

I have a web app with some ‘safety’ code which causes a page reload

  • 0

I have a web app with some ‘safety’ code which causes a page reload if the server (Socket.IO) connection goes silent for more than 5 seconds (generally customer site firewall/broken-proxy issues).

The Socket.IO connection stops as soon a new page starts loading, but the safety code doesn’t see this. Navigating to a slow page causes the safety code to fire and jump you back to the previous page.

I need to be able to tell (just before this code causes a reload) whether the browser is currently waiting for a new (slow) page to load.

What approaches are there to doing this, other than putting a jQuery click event on every link (which would not catch navigation via the address bar)?

Thanks,

Chris.

  • 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-30T04:29:58+00:00Added an answer on May 30, 2026 at 4:29 am

    Monitoring window.onbeforeunload would do the trick. Fires right after the user starts navigating away.

    Try typing this in the Chrome Console on any page and click on any link:

    window.onbeforeunload = function () { console.log("oh noes"); }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app which I can create some notes, each time I
I have a web app in Java, which uses some external program (invokes a
Problem: We have a web app that calls some web services asynchronously (from the
need ask you about some help. I have web app running in Net 2.0.
.NET 3.5, C# I have a web app with a search feature. Some of
So I have this php web app, and one of my folder contains some
I have some configuration values for an asp.net web app. They will be maintained
I have been asked to implement some email address validation on a web app
I'm working on a class-based php web app. I have some places where objects
I have created some simple app in Java, and 'deployed' it using Java Web

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.