in reply to Re: Sending data to browser's URI field via POST
in thread Sending data to browser's URI field via POST

I don't think this will work well, because it will cause a double-fetch and double-render of the content. Once the form is submitted, the content is fetched, converted, and displayed to the user.

If I then use a 302, I will end up doing an additional SELECT to pull the url out of the db with that unique hash, then fetch, convert, and render the content to the user again at that final redirected url....

Though, I store the original and converted content in the db also, so I could avoid a re-fetch over port 80 at least, if I just do a SELECT from there...

But I'll have to do a pretty significant rewrite to avoid this from happening.

I'll have to think about this a bit more. Thanks for the suggestion.

  • Comment on Re: Sending data to browser's URI field via POST

Replies are listed 'Best First'.
Re^2: Sending data to browser's URI field via POST
by jasonk (Parson) on Mar 13, 2005 at 00:30 UTC
    Once the form is submitted, the content is fetched, converted, and displayed to the user. If I then use a 302, I will end up doing an additional SELECT to pull the url out of the db with that unique hash, then fetch, convert, and render the content to the user again at that final redirected url....

    Then don't send the redirect after fetching and rendering the data, do it instead, that way you only render it once.


    We're not surrounded, we're in a target-rich environment!