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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:27:32+00:00 2026-06-04T05:27:32+00:00

Is it possible in mobile safari to get notified when the user clicks on

  • 0

Is it possible in mobile safari to get notified when the user clicks on refresh button. I want to prevent users from accidentally leaving the page as they might have some unsaved data on the page.
I have a code that shows a prompt in safari desktop but for touch safari it just does not show anything and refreshes the page.

  • 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-04T05:27:34+00:00Added an answer on June 4, 2026 at 5:27 am

    The code you did is something like this?

    $(window).bind('beforeunload', function() {
        return "You have unsaved stuff";
    }); 
    

    ​
    It seems it doesn’t work in mobile Safari

    See this possible duplicate: Is there an alternative method to use onbeforeunload in mobile safari?

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

Sidebar

Related Questions

Is it possible to allow users to drag and drop items in mobile safari?
I know its possible to open an app from mobile safari using custom URL
As the title suggests, I need a workaround to prevent mobile safari from scrolling
Possible Duplicate: iPhone Mobile Safari File System Access I want to open a locally
Is it possible to trigger a :hover event whenever a Mobile Safari user single
Is it possible to get mobile numbers of my friends using GRAPH APIs?
Real story: User taps on an advertisement inadvertently in Mobile Safari (iOS 5.0.1) and
I wondered is it possible to write mobile safari extensions? XPCOM(NSPR) like extension or
Mobile safari for ios4.2 allow printing via air print. Is it possible to do
Is it possible to programmatically open Safari and/or mobile Safari in Reader mode?

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.