Jump to content

[SOLVED] automatic close window


pikemsu28

Recommended Posts

is there a simple script to automatically close a browser after so long. i've found scripts that close a popup but this isn't a popup i want to close.  i have a task manager scheduled to load a php script that sends out an email and i want the browser to close without having to close the browser manually.

 

thanks,

Jason

Link to comment
https://forums.phpfreaks.com/topic/37356-solved-automatic-close-window/
Share on other sites

Add this in the head tag...

 

<META HTTP-EQUIV="Refresh" CONTENT="30;URL=javascript:self.close()">

 

Although this works, browsers may interpert this the wrong way and inform the user of an outside influence before colsing. Not recommended unless its a limited audience that you know. If you do use it, change the 30 which is this time in seconds. (not PHP, but javascript)

 

Best

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.