SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)

    Has anyone ever seen this mime type before?

    I just found this on someone's page:
    <link rel="stylesheet" type="text/x-opera-css;charset=utf-8" href="/start/_system/css/bf/browser/safari.css" media="screen,projection" >


    That the css is called "safari.css" is confusing me more, but what is a x-opera-css type?

    Just curious, thx.

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  3. #3
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have never seen it in use, but it is a hack to serve css only to Safari and Opera. In the German SelfHtml forums: A thread from 2007 mentioning Safari.
    Last edited by Erik J; Jan 8, 2009 at 11:51. Reason: Removed a link.
    Happy ADD/ADHD with Asperger's

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    In short it's basically like a "conditional" statement for Opera/safari....now we just need one for FF! Hah I'm just kidding, but that's pretty nifty.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  5. #5
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Ah.

    Now a conditional for Firefox would be soooo useful (sigh).

    Thanks for the link, Erik. Funny, I found it (the above met tag) on a German page.

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Not needing to use conditionals for any browser would be more useful.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    Not needing to use conditionals for any browser would be more useful.
    We would need near equal support in all browsers then .
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  8. #8
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,688
    Mentioned
    100 Post(s)
    Tagged
    4 Thread(s)
    Still, browser detection is an ugly hack that shouldn't have to occur. It's brittle and easily broken when new browsers appear.

    Just look at the problems that browser detection has caused, when Opera moved to version 10.
    http://www.sitepoint.com/blogs/2008/...tion-goes-bad/

    Opera is just the tip of the iceberg though. Microsoft needs to take note of the issues occurring now, because with IE8 coming out, IE10 won't be very far away either.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  9. #9
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Browser sensing from JavaScript was already completely unnecessary when Netscape 2 came out as from that version of JavaScript onwards JavaScript has supported feature sensing to determine whether the browser supports a given feature. Only if you need to support some browser prior to that would you need browser sensing to detect the browser (assuming that you were able to access the alternate universe where browsers supporting JavaScript but not feature sensing actually existed).

    As for the IE conditional comments - their use in browser sensing is actually a misuse of the code since the tags were originally introduced so as to allow an HTML like markup to be used for converting files between different Microsoft programs.

    <![if MSO 9]>code specific to Microsoft Office 9 goes here<![endif]>

    We already know that the conditional comments don't have a problem with two digit version numbers since Microsoft Office is already well into double figures and version 10 didn't break the conditional comments.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  10. #10
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,688
    Mentioned
    100 Post(s)
    Tagged
    4 Thread(s)
    All we need now is to convince everyone who is checking a single digit from the user agent string, to use better techniques.

    Until that issue is sorted out, microsoft may have to call IE 10 version 9.10 and IE11 version 9.11
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  11. #11
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by pmw57 View Post
    All we need now is to convince everyone who is checking a single digit from the user agent string, to use better techniques.

    Until that issue is sorted out, microsoft may have to call IE 10 version 9.10 and IE11 version 9.11
    I have yet to see any browser detection script involving the useragent that works correctly. I have Firefox 3.0.5 identifying itself as IE 99.1 in the useragent and none of the pages doing a browser detect manage to work out that it is Firefox rather than IE. They all believe what the browser says it is even though the version it claims to be doesn't exist rather than testing for what the browser really is.

    Pages using conditional comments do correctly identify that the browser is not IE despite what the useragent says. Also we already know that conditional comments don't have an issue with double digit version numbers.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •