HTML 5 Demos on Apple.com

G

Garrett Smith

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
 
J

Joe Nine

Garrett said:
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.
 
V

VK

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.
 
G

Garrett Smith

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
 
R

rf

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.
 
R

Ry Nohryb

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
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.
 
R

Ry Nohryb

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.
 
R

Ry Nohryb

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.
 
R

Ry Nohryb

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.
 
G

Gregor Kofler

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
 
G

Gregor Kofler

Am 2010-06-06 11:36, Ry Nohryb meinte:
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
 
R

Ry Nohryb

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 ?
 
G

Gregor Kofler

Am 2010-06-06 15:18, Ry Nohryb meinte:
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
 
A

Asen Bozhilov

Garrett said:
| 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'? :))
 
A

Asen Bozhilov

Ry said:
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.
 
X

Xenplex

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
 
R

RobG

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top