使用 JSP 确定 Flash 可用性
基本上,如果用户安装了 Flash 表单,我需要将 JSP 表单替换为 Flash 表单。我知道有一个 JavaScript 选项,但不想使用它,因为这会排除那些拥有 Flash 但没有 JavaScript 的人。
在网上找不到任何东西,我确信它不会太难,有什么想法吗?如果可能的话,有些代码会很混乱:)
Basically, I need to swap a JSP form with a Flash form should the user have it installed. I know there is a JavaScript option, but don't want to use this as that cuts out people who have Flash but not JavaScript.
Can't find anything for it online, I'm sure it can't be too difficult, any ideas? Some code would be jubbly if possible :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
JavaScript 是执行此操作的正确方法。另一种选择是尝试启动一个小型 Flash 应用程序,并让 Flash 应用程序请求重定向到加载完整应用程序的内容。如果最初的 Flash 应用程序足够小,则它可以被隐藏或对非 Flash 用户不可见。
但实际上,这是一个坏主意,您应该使用 Javascript 来检测它。不使用 Javascript 但使用 Flash 的用户数量将会少得可怜。
另请参阅 http://www.petefreitag.com/item/70.cfm 和对于基于 http 标头的方法(及其限制),如何可靠地检测 Flash 是否是服务请求的发起者?。
Javascript is the right way to do this. The other alternative would be to attempt to launch a small flash app, and have the flash application request a redirect to something loading the full application. If the initial flash app were small enough, it could be hidden or made invisible to the non-flash users.
But really, that's a bad idea, and you should just use Javascript to detect it. The number of users with no Javascript but with Flash will be vanishingly small.
See also http://www.petefreitag.com/item/70.cfm and How can I reliably detect if Flash was the originator of a request to a service? for http header based approaches (as well as their limitations).