SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 28 of 28
  1. #26
    SitePoint Guru team1504's Avatar
    Join Date
    May 2010
    Location
    Okemos, Michigan, USA
    Posts
    732
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I feel that we are back to square one :-(
    Especially because Mittineague said in post 21 that the email method pretty much not ready for use. only for testing, like some parts of css3.

    So now is the redirect / email method gone?

    And we know that the $_SERVER["HTTP_ACCEPT"] idea is gone too because browsers don't include image/svg+xml in their accept_headers.
    well besides IE. Meaning— for once, IE is ahead of the game :eek :

    Am I correct that we are back to the beginning in terms of finding a proper PHP solution to svg support and other-image type fallbacks ?

  2. #27
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,175
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    I did some experimenting (with my older browsers)

    Firefox
    headertest.php request:
    text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    headertest.css request:
    text/css,*/*;q=0.1
    headertest.svg request:
    image/png,*/*;q=0.5

    Opera
    headertest.php request:
    text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
    headertest.css request:
    text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
    headertest.svg request:
    text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1

    from http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
    with "*/*" indicating all media types
    So there is some difference, but sending a catch-all "wildcard" isn't much help.

    The javascript returned "true" for both browsers, but I was unable to get an SVG file to render as a background or inline image. Though both display OK if opened directly outside of a web page. I get the feeling I'm missing something but can't put my finger on it.

  3. #28
    SitePoint Guru team1504's Avatar
    Join Date
    May 2010
    Location
    Okemos, Michigan, USA
    Posts
    732
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question

    idk if you have IE or not, but I tried that and I swear that for headertest.svg, it accepted the image/xml+svg header!


    Also, this might be an idea. I know this is a strange request, as if all of this hasn't been, but I found this open source API / Library that says it can do content negotiation (without browse sniffing, I believe by looking at the source), but I can't seem to figure out how to use the API to do content negotiation


    The author provides an example for negotiation with xhtml, but that didn't help my efforts.

    I tried contacting the author, but he hasn't responded, which I believe may be due to that the email he left to be contacted by is at the domain where I found the script.
    And that site only has this script.

    Here is another copy the zip file that I downloaded (attached): Attachment 57869

    Any ideas or would you be willing to take a shot at it?


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •