[PHP] PDF POST, but refresh is GET
I have a page the will print a telephone listing in pdf (using pdflib and inline pdf) by POSTing the requested orientation and papersize to a second page. I've found that I have to post to a second page because IE seems to cache a response, and if I post to the same page, I can never get the html to render again, as IE I suppose, is expecting PDF, and I was sending html. Anyway, this 2 page method works fine, but if I hit refresh on the window showing the PDF doc (like I do when change fonts and want to see the change), the document reformats to the default values I have for orientation and papersize. Now, IE pops up the window that says the data must be resent, so IE knows to post it, but in sniffing, I see that the request is now a GET, and there is no form data being sent. Experimenting around, I added some foreach statements at the top and bottom of the page, submitted it from the first page, and when I do that (and my headers aren't sent), I can see the posted data, and the refresh stays as a POST. But, it I take out the foreach, send the headers, and the pdf; refresh becomes a GET, and I loose the users requested orientation. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PDF POST, but refresh is GET
Sounds like an IE bug to me. If it knows there is POST data and it sends a GET, it is just plain wrong. How about just using GET-method vars in the URL to bounce this stuff along, or even a cookie-based session. -Rasmus On Wed, 28 Aug 2002, Matt Schroebel wrote: I have a page the will print a telephone listing in pdf (using pdflib and inline pdf) by POSTing the requested orientation and papersize to a second page. I've found that I have to post to a second page because IE seems to cache a response, and if I post to the same page, I can never get the html to render again, as IE I suppose, is expecting PDF, and I was sending html. Anyway, this 2 page method works fine, but if I hit refresh on the window showing the PDF doc (like I do when change fonts and want to see the change), the document reformats to the default values I have for orientation and papersize. Now, IE pops up the window that says the data must be resent, so IE knows to post it, but in sniffing, I see that the request is now a GET, and there is no form data being sent. Experimenting around, I added some foreach statements at the top and bottom of the page, submitted it from the first page, and when I do that (and my headers aren't sent), I can see the posted data, and the refresh stays as a POST. But, it I take out the foreach, send the headers, and the pdf; refresh becomes a GET, and I loose the users requested orientation. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PDF POST, but refresh is GET
GET solved it. -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 28, 2002 2:44 PM To: Matt Schroebel Cc: [EMAIL PROTECTED] Subject: Re: [PHP] PDF POST, but refresh is GET Sounds like an IE bug to me. If it knows there is POST data and it sends a GET, it is just plain wrong. How about just using GET-method vars in the URL to bounce this stuff along, or even a cookie-based session. -Rasmus On Wed, 28 Aug 2002, Matt Schroebel wrote: I have a page the will print a telephone listing in pdf (using pdflib and inline pdf) by POSTing the requested orientation and papersize to a second page. I've found that I have to post to a second page because IE seems to cache a response, and if I post to the same page, I can never get the html to render again, as IE I suppose, is expecting PDF, and I was sending html. Anyway, this 2 page method works fine, but if I hit refresh on the window showing the PDF doc (like I do when change fonts and want to see the change), the document reformats to the default values I have for orientation and papersize. Now, IE pops up the window that says the data must be resent, so IE knows to post it, but in sniffing, I see that the request is now a GET, and there is no form data being sent. Experimenting around, I added some foreach statements at the top and bottom of the page, submitted it from the first page, and when I do that (and my headers aren't sent), I can see the posted data, and the refresh stays as a POST. But, it I take out the foreach, send the headers, and the pdf; refresh becomes a GET, and I loose the users requested orientation. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php