Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Force HTML5 video use in Safari 5 on the Mac Web Browsers
If you prefer HTML5 video to Flash, here is a method suggested by John Gruber to employ User Agent masquerading in Safari 5 to try to force sites to serve it to you.

If you turn on the Develop menu in Safari (Preferences » Advanced » check the box), you get the option to choose the User Agent string Safari will hand to a site to tell what browser it is.

From the Develop menu, Choose User Agent » Mobile Safari 3.2.2 - iPad and the site will switch to HTML5 if it supports it. You will need to refresh the page if you've already loaded it.

The setting will only last for the current browsing session. It can be made persistent using the following command (note that this is slightly different than the command linked to in the article; that one produced errors when I tried it in Terminal):
defaults write com.apple.Safari CustomUserAgent "'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10'"
This can be undone by:
defaults delete com.apple.safari CustomUserAgent
[crarko adds: Read Gruber's article for some caveats associated with making the permanent change. Remember it may make sites think you're using an iPad. It's possible the Windows version of Safari 5 can do this as well, but I haven't tried it. This hint discusses adding the iPad User Agent to the list if you are running a version of Safari that doesn't already have it.]
    •    
  • Currently 3.13 / 5
  You rated: 5 / 5 (8 votes cast)
 
[19,245 views]  

Force HTML5 video use in Safari 5 on the Mac | 7 comments | Create New Account
Click here to return to the 'Force HTML5 video use in Safari 5 on the Mac' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Force HTML5 video use in Safari 5 on the Mac
Authored by: chabig on Nov 19, '10 08:10:30AM

I prefer the easier method of deleting Flash completely. This forces most websites to serve HTML5 video. When Flash is the only option, view the site in Chrome.

http://daringfireball.net/2010/11/flash_free_and_cheating_with_google_chrome



[ Reply to This | # ]
More Caveats
Authored by: smadad on Nov 19, '10 10:00:18AM

While I do prefer HTML 5 video to Flash, this method is far from ideal. Many sites server you lower resolution video optimized for the iPad, and others serve a totally different version of the site optimized for touch.



[ Reply to This | # ]
Force HTML5 video use in Safari 5 on the Mac
Authored by: mrboma on Nov 19, '10 12:43:15PM

Ummm… doesn't Safari have extensions now? And aren't there multiple extensions that do this? Is there a reason this method is better than using an extension?



[ Reply to This | # ]
Force HTML5 video use in Safari 5 on the Mac
Authored by: asmeurer on Nov 19, '10 07:03:05PM

Yes. I use the ClickToPlugin (the next generation of ClickToFlash), which in addition to loading HTML5 video in sites like YouTube, automatically blocks plugins (including Flash) from loading by default, giving your browser a speed boost and ad cleaning.

Of course, it's possible that there is a site that has HTML5 video support but that ClickToPlugin doesn't recognize as such.



[ Reply to This | # ]
Force HTML5 video use in Safari 5 on the Mac
Authored by: Unsoluble on Nov 19, '10 10:23:28PM
The whole gist of Gruber's method here is that "telling" sites you're on an iPad can often net you pages that have been designed to deliver video via HTML5 controls; if you use ClickToFlash, you're "telling" the sites that you have Flash installed (which CtF then intercepts), so they don't send you the HTML5 version in the first place. It's there, ready for you to see, but you won't get it because your Flash support is detected.

For this and a few other reasons, I prefer having Flash completely uninstalled -- I use the keyboard-shortcut-to-Chrome trick if I really need it.

[ Reply to This | # ]
Force HTML5 video use in Safari 5 on the Mac
Authored by: Oofa on Nov 20, '10 10:35:35AM

The new ClicktoPlugin (new v. of ClicktoFlash) blocks the Flash but also searches for the HTML5 version and serves it up automatically instead. It's pretty cool.



[ Reply to This | # ]
Force HTML5 video use in Safari 5 on the Mac
Authored by: David Allen on Nov 22, '10 10:52:12PM

I tried this and got some strange results where Safari got diverted to some wacko iTunes address and would not load the pages that I wanted. I set the defaults back and all returned to normal.

---
Dah•veed |David Allen|
Monterrey, NL, Mexico



[ Reply to This | # ]