F1Fan Posted September 26, 2008 Share Posted September 26, 2008 Is there a way to detect if someone hit the "Stop" button on their browser before the page finishes loading? I have a page that runs a CGI script. The CGI script then generates a PHP file that is then included in the first page. When it is done using the CGI-generated PHP file, it deletes it. This all works perfectly, except that if the user hits the stop button, the CGI still finishes generating the PHP file, but that file is never deleted. Also, each time this file is generated, it uses a unique name to prevent two users from trying to access the same file (one could delete the file while the other is still using it). So there's no way to delete all the files when loaded. Any ideas? Link to comment https://forums.phpfreaks.com/topic/125961-detect-stop-page-load-button/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.