Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 7 Monaten, 2 Wochen
Letzter Beitrag:
vor 7 Monaten, 2 Wochen
Beteiligte Autoren:
Luis Antonio Gutiérrez Flores, Fabrice Harari

[WB 22] Prevent going back to page after logout

Startbeitrag von Luis Antonio Gutiérrez Flores am 13.10.2017 14:17

Good morning, I'm having some trouble trying to prevent users from going back to the software after logging out, I've tried using some code in the Synchronization of PAGE_ but it does nothing, and I can't use the prevent from using the browser "Back" key to go back to this page because it looks bad and also prevents going back to the page while being logged in. Maybe I'm using wrong the synchronization code, any tips?


Hi Luis,

I did that some time ago, so I'm just going to give you some elements I can remember.

First it depends if you are talking about an awp site or classic one.

If in a classic one, when you can use a loop on all the pages names (with an enumxxxx) to test the context (contextexist) and close it if open (context close)

Then in all cases, in the page onload browser code, you should test with an ajaxecute if your session is valid (what is a valid session is up to you, used logged in or not, time out, etc), if not, then restart your site with a dynamicsitedisplay or pagedisplay, depending on the type of site.

Best regards

von Fabrice Harari - am 13.10.2017 14:38
Thanks Fabrice! My page is not awp, I'm going to try this, just another question. Where do I put the code for the enum? Is it in the onload browser event too?

von Luis Antonio Gutiérrez Flores - am 13.10.2017 14:56
Hi again

you need to do the enum and the context closing in the code that is closing your web site (log off, or init of the new login page, if you are going back to that)

anyway, that part is in serve code, to make sure that anything that they MAY access from the browser history will NOT function on the server side.

The browser code is to attemps to prevent them to SEE any page, the server side to make sure that if the browser side is not enough, they will at least not be able to go any further than a snapshot of an old page

Best regards

von Fabrice Harari - am 13.10.2017 16:04
Got it working Fabrice! Thanks for your help! :D

von Luis Antonio Gutiérrez Flores - am 13.10.2017 17:41
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.