You'll have to use Javascript as server side technology can't close a client-side browser.