Does HTML understand "if-else"?
HTML has a limited set of "if/else" test on the browser's capabilities, e.g. whether it can handle scripts (<noscript>
), frames (<noframes>
), etc.
Your case on Flash-plugins can be handled by fallback content of <object>
, for example:
<object type="application/x-shockwave-flash" data="x.swf" width="400" height="300">
<param name="movie" value="x.swf" />
<p>Your browser does not support Flash etc etc etc.</p>
</object>
(See Providing alternative images if Adobe Flash isn’t available for more alternatives.)
But it's not possible to have a bandwidth control with HTML alone.
You must use javascript. Here is a plugin detection tool on JS.
http://www.oreillynet.com/pub/a/javascript/2001/07/20/plugin_detection.html
var isFlashInstalled = detectFlash();
if (isFlashInstalled)
{
window.location = "main_with_flash.htm";
}
else
{
window.location = "main_no_flash.htm";
}