List Info

Thread: IE XML header problem




IE XML header problem
user name
2007-12-18 03:34:07
Hi.

I am creating an aplication that has to be able to provide a
link to
an XML file for the user to download. It works fine in
Firefox, Opera,
Safari and Netscape. But not in IE... If i just select Open
it
displays fine in the browser window. But if i then try to
save it to
harddrive, it is not saved. If I, on the other hand select
Save after
clicking the link IE dispalys a error message, saying that i
can not
read the ressource.
The XML i provided via a PHP script and i set the following
headers:

header('Content-type: application/xml');
header("Content-Disposition: attachment;
filename=export.xml");

I suspect that it is a header problem, but I have not been
able to
find a sulution.
Hav any one seen this error before or have a sulution?

Thanks...

Jacob
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---


Re: IE XML header problem
user name
2007-12-18 07:42:11
try this.....
header(';Content-type: text/xml');

--
Sem mais para o momento,
Rodrigo Souza

--------------------------------------------------------------------------------
:: Rodrigo Souza dos Santos
:: Curitiba - Paraná - Brasil
:: rodrigosouzadossantosgmail.com">rodrigosouzadossantosgmail.com
--------------------------------------------------------------------------------

On Dec 18, 2007 7:34 AM, Jacob Christiansen < christiansen.jacobgmail.com">christiansen.jacobgmail.com> wrote:

Hi.

I am creating an aplication that has to be able to provide a link to
an XML file for the user to download. It works fine in Firefox, Opera,
Safari and Netscape. But not in IE... If i just select Open it
displays fine in the browser window. But if i then try to save it to
harddrive, it is not saved. If I, on the other hand select Save after
clicking the link IE dispalys a error message, saying that i can not
read the ressource.
The XML i provided via a PHP script and i set the following headers:

header(';Content-type: application/xml');
header(&quot;Content-Disposition: attachment; filename=export.xml&quot;);

I suspect that it is a header problem, but I have not been able to
find a sulution.
Hav any one seen this error before or have a sulution?

Thanks...

Jacob



--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---

Re: IE XML header problem
user name
2007-12-18 08:08:43
Hi again...

header('Content-type: text/xml'); won't work since i need to
change
the ancoding of my XML file to US-ANSII or something like
that...

But I finally found what I was looking for. The following
works:

header('Content-type: application/xml');
header("Content-Disposition: attachment;
filename=export.xml");
header('Pragma: private');
header('Cache-control: private, must-revalidate');

It has something to do with the way IE uses the headers. The
Pragma is
aparently some leftover part from the HTTP/1.0
specification, witch is
still part of the HTTP/1.1 specification for backward
compatibility.
It is equivalent to the Cache-Control, but both should be
set to be
sure (so far I only found that it is neede in IE..)

Jacob

On 18 Dec., 14:42, "Rodrigo Souza"
<rodrigosouzadossan...gmail.com>
wrote:
> try this.....
> header('Content-type: text/xml');
>
> --
> Sem mais para o momento,
> Rodrigo Souza
>
>
------------------------------------------------------------
--------------------
> :: Rodrigo Souza dos Santos
> :: Curitiba - Paraná - Brasil
> :: rodrigosouzadossan...gmail.com
>
------------------------------------------------------------
--------------------
>
> On Dec 18, 2007 7:34 AM, Jacob Christiansen
<christiansen.ja...gmail.com>
> wrote:
>
> > Hi.
>
> > I am creating an aplication that has to be able to
provide a link to
> > an XML file for the user to download. It works
fine in Firefox, Opera,
> > Safari and Netscape. But not in IE... If i just
select Open it
> > displays fine in the browser window. But if i then
try to save it to
> > harddrive, it is not saved. If I, on the other
hand select Save after
> > clicking the link IE dispalys a error message,
saying that i can not
> > read the ressource.
> > The XML i provided via a PHP script and i set the
following headers:
>
> > header('Content-type: application/xml');
> > header("Content-Disposition: attachment;
filename=export.xml");
>
> > I suspect that it is a header problem, but I have
not been able to
> > find a sulution.
> > Hav any one seen this error before or have a
sulution?
>
> > Thanks...
>
> > Jacob
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )