36
Views
3
Comments
How to Auto close the window browser page
Application Type
Reactive

I have a requirement where I need to auto close the browser page. I tried all JavaScript methods i.e. window.close(),    (_self).close  but none of the option work for me.  Appreciate if there is any suggestion.

2025-12-15 09-29-24
Thibaut G

Hi,

Based on my experience, you can only close a browser window with window.close() if it was opened by your script using window.open().

Closing a window that wasn’t opened by your script is generally restricted for security reasons

There might be more experienced developers who have alternative solutions or workarounds.

Kind regards

Thibaut 

2024-09-12 02-43-38
Deepsagar Dubey

Hi @ABU Application Support 

You can use window.top.close();  JavaScript method instead of window.close();, This should close the current tab.

i hope it'll help you.

Thanks
Deep


2020-07-21 19-28-50
Rajat Agrawal
Champion

Hi @ABU Application Support 

I agree with @Thibaut G  there is no other method to close window which are not open programmatically .

because of This restriction exists to prevent malicious websites from interfering with the user's browsing experience. Browsers prioritize user control over their browsing environment, so such actions are intentionally limited. 

if you want to close then open window programmatically .

I attached a Sample OML which open and close via programmatically .


Regards ,

Rajat

FBS_WindowClose.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.