Results 1 to 7 of 7
Jun 4, 2007, 14:22 #1
- Join Date
- Jul 2004
- Cache Valley, USA
- 0 Post(s)
- 0 Thread(s)
HTTP Header to tell Browser to Stay Put?
Is there such a thing as an HTTP header that causes the browser NOT to reload the page?
We've got a simple form in the sidebar on one of our pages (for name and e-mail address). Originally when the user clicked "submit" the PHP handler script sent back a file download. The headers we were sending to force the download resulted, of course, in the browser popping up its default file download window. From the user's perspective, the browser never navigated away from the page.
Now we want to send an e-mail instead... but once the form is submitted, and the e-mail sent by the handler script, obviously the browser believes it's supposed to go somewhere.
So I'm wondering if maybe there's a header type that tells the browser to "stay put." I mean, you've got your Location header which tells the browser where to go; you've got the force-download and content type headers, which tell the browser its supposed to download a file instead of load a web page. Is there something I can use to cause the browser to send the form contents to the handler script, but not load the resulting page?