|
|||||||||
|
Management of temporary filesOften programs have to generate temporary files or may generate a number of separate files. Temporary files should generally be created in a temporary directory and be deleted before the program exits to avoid filling up the disk. Some operating systems have appropriate standard temporary directories that are automatically purged, often on a daily basis or on system reboot. Where a process generates several separate output files, such as an HTML document and a number of image files to be included, the main file should be returned as an HTML document with links to the files to be included. These files should be scheduled for deletion in some way, perhaps by spawning a program that delays for a period long enough for the browser to fetch them, and then deletes them and exits. The main HTML document should include an Expires header.
Spinning the Web by Andrew Ford |
||||||
Copyright © 1996-2002 Ford & Mason Ltd |