#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    SVG works in one ISP but not another


    I am not allowed to post URLs, so this is a bit difficult to describe.

    I have an svg file on one ISP. If its address is directly entered in a browser, it works fine.

    But if it is called from an html file, in any ISP, it fails.

    But placed on another ISP, the svg can be called from an html on any ISP.

    Hope that is clear.

    This is the same in all the browsers I have tried: Firefox, Safari, iCab, Chrome. I am using Mac OS X 10.7.5.

    My ISP (web10-dk) doesn't believe this can be their fault, and refuses to take it seriously.

    Any suggestions?

    Regards
    Don Wagner
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4303
    Welcome to DevShed Forums, dbwagner.

    As you found out new users are restricted from posting URLs until they have made 5 posts. You may need to get around this by leaving out the "http://" and putting a space before each ".". Yes this rule is annoying, but the administrators say it's necessary for limiting spam.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #3
  5. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    The server where the file is not working is probably returning an incorrect content-type for the file, which would make it their fault.

    It's relatively easy to prove this. If you use developer tools for Firefox or Chrome you can examine the HTTP requests that are being run and review the content-type being returned with the request for the SVG image file.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    Thank you - But I'm sorry to say I can't figure out how to do that. I wonder if you would mind taking a look at these URLs:

    This works in all ISPs:
    donwagner .dk / SVG-test / Jigu3 .1 .svg

    This doesn't work:
    donwagner .dk / SVG-test / SVG-test .html

    This does work:
    staff .hum .ku .dk / dbwagner / SVG-test / SVG-test .html

    Regards
    Don
  8. #5
  9. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    The servers are returning different content-types for the svg files. The working server is returning "image/svg+xml", the broken server is returning "text/xml". If the broken server's configuration is modified to return "image/svg+xml" for svg files, then I bet it would work correctly.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by E-Oreo
    The servers are returning different content-types for the svg files. The working server is returning "image/svg+xml", the broken server is returning "text/xml". If the broken server's configuration is modified to return "image/svg+xml" for svg files, then I bet it would work correctly.
    Thank you very much - I have written to the ISP, and maybe they will do something about it.

    I really don't want the hassle of changing ISPs, and embedding the svg code in the html would make the html bloated and very difficult to work with. Can you suggest a workaround? For example, some way in html to tell the browser to ignore the file type returned by the server?

    Regards and thanks again,
    Don

    Note added later: My ISP has fixed the problem! So I don't need a workaround, but it looks as if using "embed" would have done it. Don.
    Last edited by dbwagner; April 24th, 2013 at 03:35 AM. Reason: New developments

IMN logo majestic logo threadwatch logo seochat tools logo