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

  • Home
  • SEARCH
  • 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 1050069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:42:55+00:00 2026-05-16T16:42:55+00:00

I recently got a situation where I need to set a bit in a

  • 0

I recently got a situation where I need to set a bit in a database from 1 to 0 on web page on close event and I found there is no such event but an unload event so I thought I can generate an AJAX call from it.

Now, when some one tries to close the browser, it should be closed instantly because of UE and if I will have AJAX request that will change a bit from 1 to 0 in database, it would probably be taking a second in my internet connection but some one on the other side can have slow connection and the browser will wait little longer prior to close. Am I right? Or the browser will be hidden and it will carry the AJAX request in the background?

Or if you think any other solution is available that would be helpful.

  • 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-16T16:42:56+00:00Added an answer on May 16, 2026 at 4:42 pm

    That is not a reliable way to do this. It’s not guaranteed that the browser will make the request and it can also potentially detrimental to user experience.

    Here’s a page with details on better ways to accomplish this:
    http://ajaxpatterns.org/Heartbeat

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

Sidebar

Related Questions

I recently got an email from a customer saying that they were getting errors
I recently got a ssl certificate from godaddy. I created the keystore properly and
We recently got some data back on a benchmarking test from a software vendor,
I recently got my home PC upgraded to a quad-core CPU and 64-bit OS.
I recently got hired as a web developer, and the project that I am
I recently got an upgrade at my work from macbook pro to a kickass
I recently got some help on here from SLaks (thank you) on the behavior
Recently got this in my Event Log: A fatal hardware error has occurred. Reported
I recently got stuck in a situation like this: class A { public: typedef
I've recently come across a situation where I've been a bit confused about which

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.