in reply to Can two separate responses be sent to the client's browser from Perl, such as via fork{}?
I would also like to update the requesting webpage at the same time
I don't think that will work. HTTP is a request-response-protocol. One request, one response. A HTTP client (browser) can't accept two responses for one request. That can not be changed.
To make it look like two things happened at the same time, you need to make the browser issue two requests, one for the update, one for the download. That can be done using client-side Javascript (timer) or maybe also using a HTTP "Refresh" header. Typically, you first request the update, and the update triggers the download request. Simply because it is very hard to trigger anything from a download request.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can two separate responses be sent to the client's browser from Perl, such as via fork{}?
by Polyglot (Chaplain) on Oct 15, 2023 at 11:21 UTC | |
by afoken (Chancellor) on Oct 16, 2023 at 00:48 UTC | |
by Fletch (Bishop) on Oct 15, 2023 at 12:56 UTC |