Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying .ico files in browser
Message
De
09/05/2001 14:57:05
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00504434
Message ID:
00505472
Vues:
23
David, I need to display .ico files through http protocol, not
from my local C: disk.

I made a file test.htm :

HTML> body>
img src='arw01up.ico'>
/body> /HTML>

If I type localhost/test.htm in IE, IE reads this page using GET request.
After that, it invokes a http GET request to retrieve ico file:

GET /arw01up.ico HTTP/1.1
Accept: */*
Referer: http://localhost/test.htm
Accept-Language: et
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)
...

My vfp winsocket server responds to this request:

this.SendData('HTTP/1.0 200 OK' + chr(13)+chr(10) + ;
'Content-Type: image/ico' + chr(13)+chr(10) + ;
chr(13)+chr(10) + FILETOSTR('arw01up.ico') )

Internet Exporer shows an empty icon with red cross instead a
image!
If I open test.htm file directly from c: or use .bmp files instead of
.ico files, all is OK.
Why browser will not display .ico files through http ?
I removed < and chanhged double quotes from message because UT does'nt allow
to send them.

>This HTML works fine for me
>
>>I have a lot of .ico files and want to show them in Browser.
>>
>>Internet Explorer 5 displays .bmp files if I return them
>>using http
>>
>>Content-type: image/bmp
>>
>>header from web server.
>>
>>However IE will not disply .ico files if I use
>>Content-type: image/ico
>>http header .
>>
>>Is it possible to display .ico files in browser ?
Andrus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform