Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by hacker (Priest)
on Mar 12, 2005 at 23:20 UTC ( [id://439025]=note: print w/replies, xml ) Need Help??


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.

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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://439025]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-03-29 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found