faqts : Computers : Programming : Languages : PHP : Common Problems : Sessions and State

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

7 of 13 people (54%) answered Yes
Recently 4 of 8 people (50%) answered Yes

Entry

How can I make sure a session stays open during a long file download?

May 18th, 2000 19:40
Nathan Wallace, Sascha Schumann


When the user starts to download a file, set the timestamp to 

    now + x * s

where x is the size of the file currently downloaded and s is the
estimated transfer rate (i.e. assume that your customer uses a slow
modem). That will prevent the session from being deleted too early.