Hope4You
Hope4You

Reputation: 1957

Long PHP script - how long until the browser times out?

This is important because I have a e-commerce site and I can't have a browser time out in the middle of payment processing! I have set_time_limit(0) in my PHP script so the script doesn't time out. But what about the user's browser? How long until it times out?

Note: data is returned to the browser only near the end of the script - most of the time involved is server work.

Also, is it possible for me to change the browser timeout length?

I need info for IE6+, Chrome, Opera, Safari, and Firefox. Thanks.

Upvotes: 0

Views: 1026

Answers (2)

PeeHaa
PeeHaa

Reputation: 72729

Why not use AJAX and let the process run in the background, but report once every x seconds / minutes back to the browser?

Upvotes: 2

eomer
eomer

Reputation: 397

Why not make the script execute as a cron job, and then save the report either in a table or as a file in whatever format you need?

Timeouts are going to vary not just by browser, but could vary from user to user. Firefox for example you can use about:config to change the different types of timeouts.

Upvotes: 0

Related Questions