Pete Freitag Pete Freitag

Server side Flash Detection

coldfusion

It would be useful if it worked reliably. According to the Flash 6 release notes "The player installation process now configures the browser to add the Flash MIME-type (application/x-shockwave-flash) to the HTTP Accept header. This enables server-side Flash Player detection." This worked fine on Internet Explorer on Windows, but with Netscape 7.02 using the flash player that comes with it, it doesn't add the header.

Here's some ColdFusion code to test this out:

<cfdump var="#GetHTTPRequestData()#">

<cfset req = GetHttpRequestData()>
<cfif req.headers.accept contains "application/x-shockwave-flash">
You have Flash 6 or above.
</cfif>

Additionally the HTTP accept header sent by IE when you reload the page is just "*/*", causing potential problems even if the header was present on all browsers.

Server side flash validation would be very useful, especially for remoting apps where Flash 6 is requeired anyways. It would have been a clean way to perhaps display a HTML version of the application.

I will test this out some more next week (I'm curious how it will work on Linux) when we get back to the states.



Like this? Follow me ↯

Server side Flash Detection was first published on April 15, 2003.

FuseGuard Web App Firewall for ColdFusion

The FuseGuard Web Application Firewall for ColdFusion & CFML is a high performance, customizable engine that blocks various attacks against your ColdFusion applications.

Comments

there is a little problem using this header.accept, when user opens a _blank window with a http request, the flash version sets of, do you have any idea of how can solve this one?
by raul on 10/09/2004 at 3:30:06 AM UTC
The above logic is working only in IE, Can any one please let me know the general solution to detect flash pm major browser's like Mozilla,Opera,Netscape and IE Thanks for your help
by Vinod on 03/29/2009 at 7:11:08 AM UTC