What is "Confirm Form Resubmission" and how is it triggered? - browser

Context
The internet does not like "Confirm form resubmission".
While trying to answer a SO question about trying to make the prompt occur, all I could find were resources regarding how to prevent it from happening.
Question(s)
What are the ways that users trigger the prompt in modern browsers? What's really happening when someone tries to refresh a form?
How could a developer programmatically trigger the prompt?
Extra kudos if you can find source documentation...

This is a php-related issue,
Whenever the method of the form submission is "post" this dialogue will appear.
No nead to do anything else

Related

Problems with sending keystrokes in Blueprism

I'm wanting to sign into Mural automatically, but their web design requires a keystroke, but I can't get my design to work. I have tried, both global send keys and send events. Furthermore, the click center input doesn't seems to register. :/ Any suggestions? The delay is implemented as a recommendation by another user:
If I understand correctly you are trying to sign into this page. I have succesfully written in its email textbox just recognizing the field with the application modeler (browser mode) and a Write stage.
As esqew suggested in the comments then when I tried to sign in there was an error saying "an email is required". The solution for me was to use Navigates, first with "Global Send Keys" action and then "Click Center" for the button.
If it is not that website and it's another one it might be helpful if you add a link to the website in your question.
There could be several reasons why your send keys or the click events are not working, in order to help you it would be necessary to see the configuration inside the stages in your object.
As clarified by jnch, the problem is resolved by using global send keys and then using another navigation stage with click center. I believe this fixes the problem since the website demands borderline human interaction.

how to show popup when session is timeout and the user is inactive in jsf?

I want the application show a popup to inform inactive user when he back to use the application that the session is timeout and to click on ok to redirect him to login again.
the first problem i cant detect that the session is timeout .
the second problem evenif i detect that the session is timeout how can i show the popup ?
i tryed o detect the session timeout with a listener but didnt work
<f:event listener="#{logincontroller.checksessiontimeout}" type="preValidate"/>
i am using primefaces and glassfish.
The problem with the approach you have chosen is the session has timed out, but you already figured it out. )
The solution could be to use ExceptionHandler.
If you really want to show a popup you can redirect to the same page passing some predefined parameter based on which your popup would be rendered. As an alternative you may consider redirection to login page right away and show notification about session expiration there. The second way looks more natural to me, but this is my personal point of view.
You may find information on how to do this in BalusC blog post
also you may find some discussion on stackoverflow here with references to other similar questions. Those would still point you to the blog post I mentioned earlier

Is there actually a way to open a popup on browser CLOSE?

I'm trying to launch a "logout" page if the usesr closes the browser...I've looked for a couple of days and I think I have looked at all of the related topics...tried quite a few...but so far, nothing is working the way I need it to...
Everything seems to trigger just navigating to the next page...I want to be able to navigate the site and NOTHING IF I LOG OUT...but if I CLOSE THE BROWSER (or the DOMAIN changes), I want to fire the logout page.
Actually, it really doesn't need to open a popup...but that would be my preference...
Thanks for any help in getting a definitive answer...
HOLD THE PHONE...
Just FYI...I found what seems to be working here:
[http://eureka.ykyuen.info/2011/02/22/jquery-javascript-capture-the-browser-or-tab-closed-event/][1]
...and it also seems that there are some very useful variations from contributers.
I also added a line to the original script to execute my logout page...
You should be able to add a listener using onbeforeunload and ask the user if they want to log out in the prompt https://developer.mozilla.org/en-US/docs/DOM/window.onbeforeunload

WebEngine "keep me logged in" functionality

Is there any way to store state, basically to have a "keep me logged in" functionality like browsers do?
I've been looking into the CookieManager, and search a lot but haven't been able to find anything on this.
I have a social feeds reader, in which if a user clicks on a link it is opened on a WebView. The thing is, that on every run of my app, when they click on a link pointing to a private facebook post, they need to log in to their accounts in order to view it, which is quite uncomfortable.
Appreciate your help.
I found this How do I persist cookies when using HTTPUrlConnection?
and this http://docs.oracle.com/javase/tutorial/networking/cookies/custom.html
which allowed me to create a persistent cookie handler.

Browser navigation, back button issue

I want to know how you guys deal with back button issues in your web applications.
I can not forbid users to click back button on their browser, but when they hit it, the page code doesn't run. So writing in page_load() makes no sense.
I have searched online and found this link: Disabling Back button on the browser. It does not work for me. Any idea?
There is no way to disable the back button. You can try to open your page/form in a new window so there would be nothing to navigate back to
Normally, If I have a critical or lengthy form, I tend to maintain a dirty-flag and if the user starts entering something, the dirty-flag gets set and on save or submit it gets reset. You can use unload/beforeunload javascript event to see if the dirty-flag is set and ask for confirmation.

Resources