PHPJavascript

Web Development Guide – My Personal Library of Tutorials and Scripts

Flash header website on browsers with no flash

June4

Detect flash support on client browser to avoid the blank box on flash header websites.

Nowadays it is a common practice for web designers to have fancy flash headers and the rest plain text websites. In this way the visitor views a good looking site while the search engines are happy with the source of text.

But what if your visitor does not have flash support. The browser gives a thin bar at the top and in place of the fancy header, a blank box appears. I mean you can understand were I am going with this. Like no flash………. fancy looks ugly and the user might just closeeeeeee the window.

If you agree with me then lets move on….

To solve this issue I did the following:

  • Step 1: Use a JavaScript function to detect if flash is installed on the visitor’s browser
  • Step 2: If yes than normally play the flash header
  • Step 3: else show an image maybe a screenshot of the flash header

Copy the code below on a new file and save it “flash_detect.js”

Insert the code below in the <body> tag

Place the flash header and image in the same folder.

Flash header=header.swf
Image=header.jpg

Done there…………… believe me this is good advice use it!

posted under PHP

Email will not be published

Website example

Your Comment:

 

3,063 spam comments
blocked by
Akismet