When closing Web App, the browser ask for : leave site? ... How to disable it?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I think my problem has no answers but I'd like to state the problem.
I deployed a web app on the internet and whenever a user tries to close it using the cross symbol on the tab. The browser asks : Leave site? The changes you made may not be saved. There is nothing to be saved in the app and I believe there should be a feature in Matlab that will stop producing that warning.
Deniz
0 comentarios
Respuestas (1)
Deepak
el 6 de Jun. de 2025
I understand that you are encountering the “Leave site? Changes you made may not be saved.” warning when users close your deployed MATLAB Web App, even though there is no data to be saved. This behavior is actually triggered by the browser itself — not MATLAB — when it detects that a webpage might be managing unsaved data, often due to JavaScript event handlers like "onbeforeunload".
Currently, MATLAB Web App Server automatically includes such handlers to prevent accidental session termination, which can be useful in cases where long-running computations or inputs are involved. However, there is no supported way to disable this browser prompt from within the MATLAB Web App framework.
If this prompt is affecting user experience, a potential workaround is to deploy your app as a standalone desktop application using MATLAB Compiler rather than as a web app, where this browser behavior will not apply.
I hope this helps.
Ver también
Categorías
Más información sobre MATLAB Web App Server en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!