How to share Flash pages through verification methods in website standards

How to share Flash pages through verification methods in website standards
1. Embed is illegal
The <embed> tag is a private tag of Netscape. Although the <embed> tag is widely used, it has not been included in the W3C from HTML3.2, HTML4.0 to XHTML1.0. Pages using the <embed> tag will not pass the W3C validation.

2. Object should be used
W3C recommends the <object> tag. Even in XHTML2, <img> will be replaced by <object>. The code to insert the flash using the <object> method is:

<object type="application/x-shockwave-flash" data="test.swf" width="200" height="100"> <parm name="movie" value="test.swf /> </object>
However, this method cannot display correctly on IE5-IE6/Win (it cannot be played continuously and must be downloaded before it can be played), but it can display correctly on lower versions. Later, the problem of continuous playback was solved by first calling a small flash file and then embedding a large flash file. However, in versions above IE5, the flash sometimes still cannot be displayed.

3. Current temporary measures
So what should we do to comply with the standards and display Flash correctly in all browsers? How did the macromedia website pass the W3C validation?

Some designers thought of using JavaScript to hide the illegal <embed> tag.

<script type="text/javascript"> if (navegiator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] { document.write(''<embed src="test.swf" ...
This is currently the better solution. If you must insert flash, use js to call it. This method can deceive the W3C validation program and make the page pass the validation. But it's just "cheating", not really meeting the standards.

How does Macromedia do it? See this code:

<!-- $RCSfile: FlashDetection2k.pm,v $ $Revision: 1.68 $ : your browser''s accept header indicates you have Flash 6,0,65,0 or better, so you''re OK for this Flash 6 movie, here it comes. -->
It adopts a compromise approach:

(1). First, JavaScript is used to determine the version of your browser and flash player;
(2) Dynamically generate HTML code in the background according to different versions.
Simply put, the <object> method is used by default. If the browser cannot handle the MIME type of the object "application/x-shockwave-flash", it inserts the child element <embed>. To be honest, this is similar to using js to hide the <embed> method, which is also a "cheating" method, but it is the most standard and perfect approach that can be done at present.

If we want to truly abandon <embed>, we can only wait for IE browser to better support <object>, perhaps until Longhorn comes out.

<<:  MySQL Series II Multi-Instance Configuration

>>:  Detailed steps for Spring Boot packaging and uploading to Docker repository

Recommend

CentOS 6.5 configuration ssh key-free login to execute pssh command explanation

1. Check and install pssh, yum list pssh 2. Becau...

About installing python3.8 image in docker

Docker Hub official website 1. Search for Python ...

Methods to enhance access control security in Linux kernel

background Some time ago, our project team was he...

Zabbix monitors mysql instance method

1. Monitoring planning Before creating a monitori...

Vue uses el-table to dynamically merge columns and rows

This article example shares the specific code of ...

Website User Experience Design (UE)

I just saw a post titled "Flow Theory and Des...

How to load third-party component libraries on demand in Vue3

Preface Take Element Plus as an example to config...

Some methods to optimize query speed when MySQL processes massive data

In the actual projects I participated in, I found...

A collection of possible problems when migrating sqlite3 to mysql

Brief description Suitable for readers: Mobile de...

MySQL learning notes help document

View system help help contents mysql> help con...

Navicat for MySQL 15 Registration and Activation Detailed Tutorial

1. Download Navicat for MySQL 15 https://www.navi...

In-depth understanding of MySQL various locks

Table of contents Lock Overview Lock classificati...

Tutorial on downloading, installing, configuring and using MySQL under Windows

Overview of MySQL MySQL is a relational database ...

Example code of vue + element ui to realize player function

The display without the effect picture is just em...