HTML 5 Demos on Apple.com

Discussion in 'Javascript' started by Garrett Smith, Jun 6, 2010.

  1. http://developer.apple.com/safaridemos/

    Click through to "View Demo" and you'll likely see the error message:

    | This demo was designed with the latest web standards supported by
    | Safari.

    Can you believe this shit? Unfuckingbelievable. Where are the guys who
    had the idea to carry this out, so I can personally shake their hands?

    The ironic thing here is that they are determining support in a pretty
    non-HTML 5 way.

    The pertinent lines are in browsercheck.js:

    | if(this.isSafari4()){
    | window.open(element.href,'demo',
    |
    'directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,height='

    | + this.options.height + ',width=' + this.options.width);
    | } else {
    | if(this.overlay){
    | this.overlay.appear({ duration: .3 });
    | }
    | }

    and
    | isSafari4: function(){
    | if(this._isSafari4 === undefined) {
    | if (!AC.Detector.isWebKit()) {
    | this._isSafari4 = false;
    | } else {
    | var ua = navigator.userAgent.toLowerCase();
    | var version =
    | parseInt(parseFloat(ua.substring(ua.lastIndexOf('safari/') + 7)), 10);
    | this._isSafari4 = (version >= 528);
    | }
    | }
    | return this._isSafari4;
    | }

    It is parsing the userAgent string to determine if the browser is
    Safari. It's like MSND demos only worse because where with MSDN demos,
    many of those features were proprietary innovations of Microsoft,
    Safari's demos are of standard HTML 5 features.

    The HTML 5 specification of navigator.userAgent states:

    http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-navigator-useragent

    | userAgent
    |
    | Must return the string used for the value of the "User-Agent" header
    | in HTTP requests, or the empty string if no such header is ever sent.

    Garrett
    Garrett Smith, Jun 6, 2010
    #1
    1. Advertising

  2. Garrett Smith

    Joe Nine Guest

    Garrett Smith wrote:
    > http://developer.apple.com/safaridemos/
    >
    > Click through to "View Demo" and you'll likely see the error message:
    >
    > | This demo was designed with the latest web standards supported by
    > | Safari.
    >
    > Can you believe this shit? Unfuckingbelievable. Where are the guys who
    > had the idea to carry this out, so I can personally shake their hands?
    >
    > The ironic thing here is that they are determining support in a pretty
    > non-HTML 5 way.
    >
    > The pertinent lines are in browsercheck.js:
    >
    > | if(this.isSafari4()){
    > | window.open(element.href,'demo',
    >
    > Garrett


    This doesn't surprise me from Apple. They probably want viewers to think
    this stuff only works on Safari.
    Joe Nine, Jun 6, 2010
    #2
    1. Advertising

  3. Garrett Smith

    VK Guest

    On Jun 6, 7:50 am, Garrett Smith <> wrote:
    > http://developer.apple.com/safaridemos/
    >
    > Click through to "View Demo" and you'll likely see the error message:
    >
    > | This demo was designed with the latest web standards supported by
    > | Safari.
    >


    Your objection is not clear. The page is called "Safari Technology
    Demos" and it does what has been declared: it demonstrates supported
    HTML5 features in latest Safari versions. Obviously in order to
    demonstrate these features in this browser, the page needs to be
    viewed using Safari.

    If the page would be called "Universal HTML5 support test: see what
    your current browser can" or the like, then your obsession would be
    understandable.
    VK, Jun 6, 2010
    #3
  4. On 6/5/2010 11:35 PM, Joe Nine wrote:
    > Garrett Smith wrote:
    >> http://developer.apple.com/safaridemos/
    >>
    >> Click through to "View Demo" and you'll likely see the error message:
    >>
    >> | This demo was designed with the latest web standards supported by
    >> | Safari.
    >>
    >> Can you believe this shit? Unfuckingbelievable. Where are the guys who
    >> had the idea to carry this out, so I can personally shake their hands?
    >>
    >> The ironic thing here is that they are determining support in a pretty
    >> non-HTML 5 way.
    >>
    >> The pertinent lines are in browsercheck.js:
    >>
    >> | if(this.isSafari4()){
    >> | window.open(element.href,'demo',
    >>
    >> Garrett

    >
    > This doesn't surprise me from Apple. They probably want viewers to think
    > this stuff only works on Safari.


    Right. They hype up how cool it is and then, oh, sorry, if you want to
    see it, go download Safari. They want to make something cool that works
    only in Safari. They then fib to the public that these cool things are
    standards and Apple is just way ahead of other browsers in supporting them.

    It is an attempt at a massive public deception.

    | The demos below show how the latest version of Apple’s Safari web
    | browser, new Macs, and new Apple mobile devices all support the
    | capabilities of HTML5, CSS3, and JavaScript. Not all browsers offer
    | this support. But soon other modern browsers will take advantage of
    | these same web standards — and the amazing things they enable web
    | designers to do.

    Reading that, it comes off like Apple is ahead of the game.

    There is absolutely no reason for the browser sniffing; no reason for
    not including equivalents to the proprietary css features such as
    -webkit-border-radius.

    Proprietary features that aren't part of HTML 5 or CSS3 can be expected
    to fail in other browsers, however such things cannot be honestly called
    HTML 5 and CSS3.

    Garrett
    Garrett Smith, Jun 6, 2010
    #4
  5. Garrett Smith

    rf Guest

    "Joe Nine" <> wrote in message
    news:huffjj$ur$02$-online.com...
    > Garrett Smith wrote:
    >> http://developer.apple.com/safaridemos/
    >>
    >> Click through to "View Demo" and you'll likely see the error message:
    >>
    >> | This demo was designed with the latest web standards supported by
    >> | Safari.
    >>
    >> Can you believe this shit? Unfuckingbelievable. Where are the guys who
    >> had the idea to carry this out, so I can personally shake their hands?


    The same message appears using Winidows Safari. Yes, it's a slightly old
    version but the can't even tell if I am using their own products :)

    A very good incentive to never ever use Safari of any flavour.
    rf, Jun 6, 2010
    #5
  6. Garrett Smith

    Ry Nohryb Guest

    On Jun 6, 8:55 am, Garrett Smith <> wrote:
    > On 6/5/2010 11:35 PM, Joe Nine wrote:
    >
    > > This doesn't surprise me from Apple. They probably want viewers to think
    > > this stuff only works on Safari.


    Because most of this stuff currently only works in Safari: YES, Safari
    is the leader, whether you like it or not.

    > Right. They hype up how cool it is and then, oh, sorry, if you want to
    > see it, go download Safari. They want to make something cool that works
    > only in Safari. They then fib to the public that these cool things are
    > standards and Apple is just way ahead of other browsers in supporting them.
    >
    > It is an attempt at a massive public deception.


    As usual, you're able to read but not to comprehend.

    > | The demos below show how the latest version of Apple’s Safari web
    > | browser, new Macs, and new Apple mobile devices all support the
    > | capabilities of HTML5, CSS3, and JavaScript. Not all browsers offer
    > | this support. But soon other modern browsers will take advantage of
    > | these same web standards — and the amazing things they enable web
    > | designers to do.
    >
    > Reading that, it comes off like Apple is ahead of the game.


    Because they *are* ahead.

    > There is absolutely no reason for the browser sniffing; no reason for
    > not including equivalents to the proprietary css features such as
    > -webkit-border-radius.


    Browser makers are obligated to prepend their brand name in front of
    any proprietary CSS extensions. When/if their proprietary extensions
    ever make it into a w3 standard, then the prefix will be removed. E.g.
    Mozillas have their own moz-border too. Now that it's a w3 standard
    (not yet, but almost there), you can type just border-radius, but only
    a few browsers (and not all safaris) will recognize it in the
    standards-compliant prefix-less way.

    And, for many of Apple's proposed-as-a-standard extensions there are
    no equivalences yet: CSS 2d transitions, CSS 2d animations, CSS 3d
    transitions, CSS 3d animations, etc.

    Also, no other browser but Safari is currently able to play h264
    <video> nor AAV <audio>, nor 3d webGL content, nor... etc.

    > Proprietary features that aren't part of HTML 5 or CSS3 can be expected
    > to fail in other browsers, however such things cannot be honestly called
    > HTML 5 and CSS3.


    Yes they can, because they're on the w3 table for standardization in/
    as HTML5.
    --
    Jorge.
    Ry Nohryb, Jun 6, 2010
    #6
  7. Garrett Smith

    Ry Nohryb Guest

    On Jun 6, 9:33 am, "rf" <> wrote:
    >
    > The same message appears using Winidows Safari. Yes, it's a slightly old
    > version but the can't even tell if I am using their own products :)


    It's not just about "using Safari", it's about using a version of
    Safari that supports that features, genius.
    --
    Jorge.
    Ry Nohryb, Jun 6, 2010
    #7
  8. Garrett Smith

    Ry Nohryb Guest

    On Jun 6, 8:50 am, VK <> wrote:
    > On Jun 6, 7:50 am, Garrett Smith <> wrote:
    >
    > >http://developer.apple.com/safaridemos/

    >
    > > Click through to "View Demo" and you'll likely see the error message:

    >
    > > | This demo was designed with the latest web standards supported by
    > > | Safari.

    >
    > Your objection is not clear. The page is called "Safari Technology
    > Demos" and it does what has been declared: it demonstrates supported
    > HTML5 features in latest Safari versions. Obviously in order to
    > demonstrate these features in this browser, the page needs to be
    > viewed using Safari.
    >
    > If the page would be called "Universal HTML5 support test: see what
    > your current browser can" or the like, then your obsession would be
    > understandable.


    Exactly. But Garrett has problems with reading comprehension.
    --
    Jorge.
    Ry Nohryb, Jun 6, 2010
    #8
  9. Garrett Smith

    Ry Nohryb Guest

    On Jun 6, 8:35 am, Joe Nine <> wrote:
    >
    > This doesn't surprise me from Apple. They probably want viewers to think
    > this stuff only works on Safari.


    Because most of this stuff currently only works in Safari and to a
    lesser extent in Chrome too (because it shares the webkit engine). Try
    any of these in IE, LOL, ROTFLOL.
    --
    Jorge.
    Ry Nohryb, Jun 6, 2010
    #9
  10. Am 2010-06-06 05:50, Garrett Smith meinte:
    > http://developer.apple.com/safaridemos/
    >
    > Click through to "View Demo" and you'll likely see the error message:
    >
    > | This demo was designed with the latest web standards supported by
    > | Safari.
    >
    > Can you believe this shit? Unfuckingbelievable. Where are the guys who
    > had the idea to carry this out, so I can personally shake their hands?


    Perhaps hanging out with the guys doing the page, and who are utterly
    incompetent, when it comes to proper web authoring.

    And after all: They somehow have to give their browserdetect.js shite a go.

    Gregor


    --
    http://www.gregorkofler.com
    Gregor Kofler, Jun 6, 2010
    #10
  11. Am 2010-06-06 11:36, Ry Nohryb meinte:
    > On Jun 6, 8:55 am, Garrett Smith<> wrote:
    >> On 6/5/2010 11:35 PM, Joe Nine wrote:
    >>
    >>> This doesn't surprise me from Apple. They probably want viewers to think
    >>> this stuff only works on Safari.

    >
    > Because most of this stuff currently only works in Safari: YES, Safari
    > is the leader, whether you like it or not.


    Jorge, good ol' Apple fanboy! You can surely elaborate on why Apple
    webauthors are hardcore browser sniffers. I suppose that's because they
    way ahead of the rest of the (pathetic) browser scripting crowd.

    Gregor


    --
    http://www.gregorkofler.com
    Gregor Kofler, Jun 6, 2010
    #11
  12. Garrett Smith

    Ry Nohryb Guest

    On Jun 6, 2:15 pm, Gregor Kofler <> wrote:
    >
    > Jorge, good ol' Apple fanboy! (...)


    I knew someone was going to call me that, sooner or later, it's been
    you, and now: it's funny that sometimes, calling names is the one and
    only argument left.

    As VK said, what part of "Safari Technology Demos" you don't get ?
    --
    Jorge.
    Ry Nohryb, Jun 6, 2010
    #12
  13. Am 2010-06-06 15:18, Ry Nohryb meinte:
    > On Jun 6, 2:15 pm, Gregor Kofler<> wrote:
    >>
    >> Jorge, good ol' Apple fanboy! (...)

    >
    > I knew someone was going to call me that, sooner or later, it's been
    > you,


    Yes, I'm pretty proud of that.

    > and now: it's funny that sometimes, calling names is the one and
    > only argument left.


    I can state without fear of contradiction, because it's true.

    > As VK said, what part of "Safari Technology Demos" you don't get ?


    Your subject states "HTML 5" - not "proprietary web technology provided
    by the best browser out there". Anyway, I simply can't see your
    superduper demos, since Safari is not available for my OS.

    Gregor


    --
    http://www.gregorkofler.com
    Gregor Kofler, Jun 6, 2010
    #13
  14. Garrett Smith

    Ry Nohryb Guest

    On Jun 6, 3:43 pm, Gregor Kofler <> wrote:
    > (...) since Safari is not available for my OS.


    Gregor, good ol' Linux fanboy! What's your OS ? is it Gregorux,
    Koflerux, or GregorKoflerux ?
    --
    Jorge.
    Ry Nohryb, Jun 6, 2010
    #14
  15. Garrett Smith

    Ry Nohryb Guest

    On Jun 6, 11:36 am, Ry Nohryb <> wrote:
    >
    > Also, no other browser but Safari is currently able to play h264
    > <video> nor AAV <audio>, nor 3d webGL content, nor... etc.


    s/AAV/AAC
    --
    Jorge.
    Ry Nohryb, Jun 6, 2010
    #15
  16. Garrett Smith wrote:

    > | if(this.isSafari4()){


    They have a method which check for Safari 4? So if I want to use their
    superduper browser detection script I need to invoke each time their
    method. They can use another approach:

    isSafari4 : (function () {
    // Here goes their detection
    })()

    if (this.isSafari4) {
    // Do another stupid thing
    }

    The things are more interesting in `browserdetect.js`
    <URL: http://devimages.apple.com/assets/scripts/browserdetect.js />

    if (typeof(AC) === "undefined") {
    AC = {};
    }

    Where actually is declaration of `AC'? :))
    Asen Bozhilov, Jun 6, 2010
    #16
  17. Ry Nohryb wrote:
    > Gregor Kofler wrote:
    >
    > > (...) since Safari is not available for my OS.

    >
    > Gregor, good ol' Linux fanboy! What's your OS ? is it Gregorux,
    > Koflerux, or GregorKoflerux ?


    Is it really matter that? If they were used some conformance page the
    things will be good, but their strategy to parse UA string is a
    terrible idea.

    I cannot see any demos, too. Safari is not available for my Debian and
    I am not planning to change OS to see those demos.
    Asen Bozhilov, Jun 6, 2010
    #17
  18. On 2010-06-06 15:58, Ry Nohryb wrote:
    > On Jun 6, 3:43 pm, Gregor Kofler<> wrote:
    >> (...) since Safari is not available for my OS.

    >
    > Gregor, good ol' Linux fanboy! What's your OS ? is it Gregorux,
    > Koflerux, or GregorKoflerux ?


    Who cares?

    Gregor
    Gregor Kofler, Jun 6, 2010
    #18
  19. Garrett Smith

    Xenplex Guest

    The problem is, that non-techies think that only Safari is capable of
    doing HTML5 stuff and/or that when they visit the site with another
    browser, that they maybe get a false impression of HTML5: "What's this
    crap of HTML5? It doesn't work with my browser!"
    You know what I mean.

    MFG,
    Xenplex
    Xenplex, Jun 7, 2010
    #19
  20. Garrett Smith

    RobG Guest

    On Jun 6, 1:50 pm, Garrett Smith <> wrote:
    > http://developer.apple.com/safaridemos/
    >
    > Click through to "View Demo" and you'll likely see the error message:
    >
    > | This demo was designed with the latest web standards supported by
    > | Safari.
    >
    > Can you believe this shit?


    Yes, more Prototype.js based junk. I really wish these guys would get
    their act together, it makes them look like complete idiots. Change
    the UA string in Safari to Firefox 3.5.3 and you get the same
    message.

    They use a heap of crap (Prototype.js, Scriptaculous.js, apple-core,
    browser-detect, etc.) just to show one crappy in-page dialog. Given
    that they use a very simplistic UA sniff, why not just put the message
    in the page during load? Or in-line with document.write - after all,
    they use it to add a style sheet.

    You can go through to the page by turning off JavaScript (or spoofing
    the Safari UA string probably):

    <URL: http://developer.apple.com/safaridemos/showcase/video/ >

    [...]
    > The ironic thing here is that they are determining support in a pretty
    > non-HTML 5 way.


    More like in a simplistic, doomed to fail way. Take a look at the
    platform "detection":

    | // ** {{{ AC.Detector.getAgent() }}} **
    | //
    | // Returns the name of the user agent, normalized as all lower
    case.
    | getAgent: function()
    | {
    | return navigator.userAgent.toLowerCase();
    | },
    |
    | // ** {{{ AC.Detector.isMac() }}} **
    | //
    | // Returns whether or not the platform is a Mac.
    | isMac: function(userAgent)
    | {
    | var agent = userAgent || this.getAgent();
    | return !!agent.match(/mac/i);
    | },

    So if a user agent string has the character sequence "mac" *anywhere*,
    with any capitalisation, it will be "detected" as being Mac OS. And
    why the hell is it "normalized" to lower case? Are they saying you can
    trust the character sequence but not capitalisation? And if the
    userAgent string is already lower case, why the - i - flag?


    --
    Rob
    RobG, Jun 7, 2010
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wayne  Wengert

    Still Problems Running Demos

    Wayne Wengert, Sep 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    358
    Wayne Wengert
    Sep 29, 2004
  2. Heather B

    Simple linked list demos

    Heather B, Sep 14, 2003, in forum: Java
    Replies:
    2
    Views:
    5,737
    Roedy Green
    Sep 14, 2003
  3. Replies:
    0
    Views:
    346
  4. Replies:
    0
    Views:
    317
  5. Replies:
    0
    Views:
    377
Loading...

Share This Page