The New MobileMe Login Page Has Some Badass JS(badassjs.com)
badassjs.com
The New MobileMe Login Page Has Some Badass JS
http://badassjs.com/post/1649735994/the-new-mobileme-login-page-has-some-badass-js
10 comments
That is indeed some badass JS, but why does it send my CPU to 100% and turn both the fans on my MacBook Pro, I thought only Flash did that?
You must be mistaken. The fan was installed for Flash. This is why Flash needs to die; so Apple can exclude the fan and make a smaller, lighter notebook.
I'm not familiar with Apple-related net memes, but is this a joke or is it the actual reason for having a fan? If it's not Flash that makes the CPU run at 100%, it could be anything else. I'd hate to have a notebook that I couldn't run at 100% CPU if I wanted to. Let me encode video on the go, or run a parallel build. Removing the fan when there's still a thermal vulnerability would be unwise.
The background: A lot of Mac users (myself included, in the interest of disclosure) feel that Flash's performance on the Mac is piss-poor in the average case (e.g. making the fans go wild even when not doing anything all that fancy) and advocate for Web standards like HTML and JavaScript to be used in its place wherever possible, because at least those can be improved independent of Adobe, whom they perceive to be lax in supporting niche platforms. Other people feel that this first group is deluded by Apple propaganda and naive to believe that JavaScript performance will be any better than Flash. Thus, the parent was mocking these JavaScript advocates on the basis that the scripts on this page were performing badly on the GP's system.
And the fact that this script is made by Apple itself only adds to the irony
Sounds like a perfect opportunity for Chrome, Firefox, Opera, or a new company to build a better browser than Safari. Apple is using an open technology implemented by several competing organizations.
I'm not sure what to say except: yes, it is a joke.
Time for Mr Daring Fireball to release the hounds on Javascript being enabled. No, wait..
It didn't freeze my computer or stutter my mouse like Flash or a runaway ietester.exe process, despite being at the same CPU usage. (50%)
Also, I'd say that this allows the browser vendor opportunity to deal with runaway scripts in a better way than the nil of control Flash gives. Good reason for a multi-process architecture as well.
Also, I'd say that this allows the browser vendor opportunity to deal with runaway scripts in a better way than the nil of control Flash gives. Good reason for a multi-process architecture as well.
Even without Flash installed, my Safari often locks (beachballs) for a few seconds when I'm working with a bunch of tabs, particularly when closing one.
Flash is weird. I don't particularly like it for usability/security reasons, yet I haven't experienced this dire OS X performance that others always talk of.
Flash is weird. I don't particularly like it for usability/security reasons, yet I haven't experienced this dire OS X performance that others always talk of.
I think you may have larger problems than Safari.
It makes CPU usage go through the roof though.
However nice it's looking, I'm not sure if it's such a good idea to have such a battery life eating page as your login site.
However nice it's looking, I'm not sure if it's such a good idea to have such a battery life eating page as your login site.
With the push for hardware accelerated rendering, I think this CPU hog should slowly go away.
I don't see how they're going to hardware accelerate canvas much, unless you stick to very specific operations, i.e. never touch individual pixels. GPUs are great at splatting polygons all over the place; running arbitrary JavaScript to generate pixel values, not so much. Reading back pixel values from the rendering surface is pretty much out of the question altogether.
Unless you meant the fact that WebGL seems to be taking shape, or the hardware accelerated CSS3 effects. (I doubt HTML/CSS rendering is hogging the CPU here)
Unless you meant the fact that WebGL seems to be taking shape, or the hardware accelerated CSS3 effects. (I doubt HTML/CSS rendering is hogging the CPU here)
Sigh, soon the days where FlashBlock makes the web nice and calm (and easy on the cpu) will be gone.
I suppose you could always create a no-canvas plugin, as well as one that stops <video> and <audio> tags from playing. Sure, it wont be as simple as striping out any embeded .swf's in the page, but that's not to say it isn't possible. Where there's a demand, there will be a plugin.
And hey, there's always links.
And hey, there's always links.
Given the context, you probably mean Lynx.
http://en.wikipedia.org/wiki/Lynx_%28web_browser%29
http://en.wikipedia.org/wiki/Lynx_%28web_browser%29
That is some pretty iCandy indeed.
Looks like Apple is starting to eat its own dog food. Want flash style without Flash? Do it in JS.
If by badass you mean horrible, then yes. It browser sniffs and then adds classes to the html element depending on which rendering engine, version and platform you're using. e.g. in FF 3.6 the html element has "mozilla windows v3 v3-6".
Doesn't work in Google Chrome for some reason. You just get a simplified version (no sparkly goodness). Anyone care to speculate why Apple made this decision, given that Safari and Chrome are both webkit based?
I see it just fine in 7.0.517.44.
(All browsers are tested in Ubuntu 10.10 unless otherwise mentioned)
Chrome 8.0.552.11 dev - works
Chromium 7.0.517.44 (64615) - works
Firefox 3.6.12 - Shows a "browser not supported" page, clicking through makes it work just fine. Did notice though that the animation only happens when the window has focus - probably a nice addition so it doesn't chomp CPU time in the background.
Firefox 4.0b8pre - Fails. Blank screen.
Opera 10.60 (6344) - "Browser not supported" page. Animations do not work, logo doesn't render. Seems to fail gracefully (login fields still accessible).
IE6 (windows xp) - Fails. Does not degrade gracefully.
IE 7.0.5730.13 (windows xp) - Different warning page than FF/Opera. Degrades gracefully, no animation.
So far seems to be pretty focused on webkit browsers. No huge surprise there. What was interesting was that IE6 wasn't supported at all. There isn't even any "continue anyway" button after the "browser not supported" page.
Chrome 8.0.552.11 dev - works
Chromium 7.0.517.44 (64615) - works
Firefox 3.6.12 - Shows a "browser not supported" page, clicking through makes it work just fine. Did notice though that the animation only happens when the window has focus - probably a nice addition so it doesn't chomp CPU time in the background.
Firefox 4.0b8pre - Fails. Blank screen.
Opera 10.60 (6344) - "Browser not supported" page. Animations do not work, logo doesn't render. Seems to fail gracefully (login fields still accessible).
IE6 (windows xp) - Fails. Does not degrade gracefully.
IE 7.0.5730.13 (windows xp) - Different warning page than FF/Opera. Degrades gracefully, no animation.
So far seems to be pretty focused on webkit browsers. No huge surprise there. What was interesting was that IE6 wasn't supported at all. There isn't even any "continue anyway" button after the "browser not supported" page.
Works okay for me at first in Firefox 4.0b7 - but after a few seconds of playing with the sparkles following my mouse (nearly as childish as it sounds) it abruptly stops and they vanish. No JS error reported.
Interesting. I deleted my cookies and saved passwords and it displays correctly.
I'm in Chromium 9.0.576.0 and it doesn't seem to work for me.
Same here - displays fine in 7.0.517.44 - not sure if I think this is all that "badass" though...
I'm getting no animations in 7.0.517.44.
I'd assume it's because Safari's JS interpreter (Nitro) is a different interpreter than Chrome's V8
[deleted]
In Safari (OSX), as the little balls touch an iDevice, it lights up a bit, and eventually the device is fully lit up. On Chrome (also OSX), this effect is missing.
Interestingly different (but still very attractive) in Opera or FF.