In my visualforce page, I'm trying to close the current tab in "OnComplete" function in apex:actionFunction. I tried using both window.close() and window.top.close(). But nothing worked out.
Any idea on this ?
According to the mozilla documentation,
... for security reasons, scripts are no longer allowed to close windows they didn't open.
So the question here would be... is your window open with a script? if not, then you can't close it with javascript.
A longer answer was provided here