views:

98

answers:

3

I know most mobile browsers don't support javascript,

how can I check this?

A: 

Use the navigator properties mimeTypes and plugins Adobe provides documentation on how to check this.

if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) {
  // hasSupport
}
Marcel J.
That method of detection is incredibly outdated, and doesn't even work on IE 8, let alone a mobile browser. It also sounds like the OP is looking for a non-JS detection method.
Matt Ball
Yes,I'm seeking of a non-JS method.
+1  A: 

Don't hold it against me if it isn't helpful ;) But this seems relevant: http://kb2.adobe.com/cps/140/tn_14086.html

Merlyn Morgan-Graham
A: 

Most browsers (including mobile ones) sent a Accept header as part of the http request which will tell you what content-types it can accept so you might find application/x-shockwave-flash there.

I'm not sure if this is reliable anymore on mobile browsers though as have been out of the mobile industry for a couple of years

Another option is to query sources like WURFL or UA-Prof to try determine if the phone supports what you require - but this will not always work - especially if an alternate browser is being used on the phone

saret