tags:

views:

59

answers:

1

How can i check if the browser supports a specific mime type with php?

+1  A: 

You could analyze the Accept header field to see if the type or a superset of that type is listed.

But notice that Accept is a list of rated values and a quality value of 0 means not accepted. And browsers send different Accept values based on their expectations for that resource (e.g. a resource referenced in IMG element is expected to be an element of image/*).

Gumbo
Alternatively, if it's about inline-displayed media, nesting `<object>` elements offloads that decision to the browser.
Joey
so could i use this to check for flash player?
tarnfeld
@tarnfeld: I think you should better use the way Johannes Rössel described.
Gumbo