|
|
|
|
|
by judofyr
5757 days ago
|
|
The authentication / authorization was merely an example, and I agree that most of these solutions are done before rendering occurs. However, my point is that in order to take advantage of flushing, you want to start sending the HTML as soon as possible and this forces you to decide the status and the headers. If there's something in your stack which requires different status/header, you either need to evaluate it earlier in the request or hack around it by appending different HTML. The more you decide to evaluate earlier, the less efficient becomes the flushing. So for every piece in the stack you have to make a choice: What is the chance that this requires different status/headers/content? How much do we gain by deferring? How can we hack around it if we've already started sending a response? This is something you can't do automatically, and as far as I can see, this isn't mentioned in Yehuda's post at all. |
|