homepage Welcome to WebmasterWorld Guest from 54.196.218.113
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
vCard dilemma with firefox on macosx
safari is fine - firefox fails
hakre




msg:3228526
 10:31 am on Jan 23, 2007 (gmt 0)

I've got the following problem I'm currently looking after and investigate:

I'd like to display a link that offers a vcard to download or to be opened in the default vcard application on the system (address book). while safari does this with ease, firefox does nothing. even if I explicitly download the vcard, it saves a 0 byte file (!). FYI: the file has got more then 0 bytes.

The only thread I found on webmasterworld about a similar vcard releated problem was the following one: Downloading vCard Links in a browser [webmasterworld.com]

If anyone can point me to somewhere that might help, that would be great. I even had problems finding the right forum for it on good'ol webmasterworld.

-hakre

 

hakre




msg:3229949
 10:46 am on Jan 24, 2007 (gmt 0)

okay, we found a fix for this. this might be interesting for anyone who wants to offer downloads with a php script to the browser:

the problem is not vcard based, it was because of a wrong header that offered the browser the filename. correct headers must be (inkl. spaces and quotes):


Content-Disposition: inline; filename="file.ext"

or

Content-Disposition: attachment; filename="file.ext"

this was tested against mac osx and firefox. the only question left for me is, wether it is generally better to use inline or attachment in practise.

coopster




msg:3230429
 5:59 pm on Jan 24, 2007 (gmt 0)

Content-Disposition is not part of the HTTP standard [ietf.org] so it is always fun trying to get it to work cross-browser. A quick Google for "vcard format" turns up quite a few interesting reads, including this one from Mozilla that might be helpful ...

[vcard.mozdev.org...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved