I have build a website and would like to build the web application for it as it has some flash content which is not supported by Apple. When the user access it from a device(mobile phone or ipad) I would like the user to be directed to that web Application instead.

My question is what can I use to build the application?

Sorry if my question is a bit stupid to you, I am new to web applications.

Recommended Answers

All 2 Replies

So if you wan to redirect the user based on the user-agent (broswer), one option is to detect the browser version and display the appropriate content to the user or redirect the user to another page.

Take a look at this resource: http://www.quirksmode.org/js/detect.html

Apple devices have unique user agents, all with their device name within it. For example, an iPhone 5 may have a user agent of Apple-iPhone5C2 (which, by the way, will be most USA-based iPhone 5 users). This can be taken advantage in detecting whether a visitor is using an Apple device. The following script will do just that:


iosReg = '/apple-[ipod|iphone|ipad]/i';

if (navigator.userAgent.search (iosReg))
  // What do you want to do with the Apple device?


Fortunately (or unfortunately, in this case) I am an Android user so I cannot test the validity of my RegEx pattern. But it should be fine.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.