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
2010-01-31 13:31:09
Alternatively, if it's about inline-displayed media, nesting `<object>` elements offloads that decision to the browser.
Joey
2010-01-31 13:32:14
so could i use this to check for flash player?
tarnfeld
2010-01-31 14:11:37
@tarnfeld: I think you should better use the way Johannes Rössel described.
Gumbo
2010-01-31 14:29:30