I have been searching online to peform window.close() using the javascript. I have a MVC application,when i click on logoff button the page should close.
I know that the window.close is not working now a days as there is some security reasons. Getting the message "Scripts may close only the windows that were opened by it".
Tried almost all the options to close the window but nothing works till now.
<a href="#" onclick="javascript:window.close();"> method1 <a/>
<a href="javascript:window.open('','_self').close();">method2</a>
<a href="javascript:window.top.close();">method2</a>
Any help is appreciated.
Thanks
Dev