Possible to spoof iPad UA in Safari through script?

I apologize if this question comes across as asinine, but is it possible to spoof the UA string of an iPad in Safari via a script of some sort?

I know it can be done through the Develop > User Agent menu item, but I am interested in making a Safari extension that forces a page that only serves HTML5 video to iPads to work without manually changing the UA every time.

Thank you

Answers


Not sure if this works on iOS, but this article might help you. Some of the comments are useful:

defaults write com.apple.Safari CustomUserAgent "\"Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3\""


Yes... it's definitely possible!

The UA is just something the browser is sending (and can always be spoofed!)... with a little customization it can be changed, so a browser extension would naturally be able to do that.


Need Your Help

Conditional Style on SharePoint List View

view sharepoint-2010 formatting

I got a standard webpart that displays the contents of a document library.

How to write a function whose both parameters and results are polymorphic in Haskell

haskell parameters polymorphism typeclass result

How can I write a function like int gog(float i) and float gog(int i) (which is usually called "overloading")? Some simple overloads can be achieved by

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.