When a user requests a new page, handle it all inline to the initial proof_frame.php load instead of doing a 302 redirect.
Currently when a user clicks "Start Proofreading" we load proof_frame.php for it to figure out which page to give the user and then it redirects back to itself. But there's no need to do the redirect -- we already have all of the data we need to just serve the page up. We could have removed one more level of indirection and just construct the PPage object directly instead of calling get_requested_PPage() but this keeps the PPage construction all in one place.
Except for removing the redirect, this should work exactly like it did before. This page is loaded within a frame in proof.php so the change in the URL is transparent to the user.
When a user requests a new page, handle it all inline to the initial
proof_frame.php
load instead of doing a 302 redirect.Currently when a user clicks "Start Proofreading" we load
proof_frame.php
for it to figure out which page to give the user and then it redirects back to itself. But there's no need to do the redirect -- we already have all of the data we need to just serve the page up. We could have removed one more level of indirection and just construct the PPage object directly instead of callingget_requested_PPage()
but this keeps the PPage construction all in one place.Except for removing the redirect, this should work exactly like it did before. This page is loaded within a frame in
proof.php
so the change in the URL is transparent to the user.Sandbox: https://www.pgdp.org/~cpeel/c.branch/reduce-redirects/