START | V Is there a Content-Type and is the UA going to obey it blindly? | | | YES | NO | | | X HERE GOES NEW LOGIC | | | V YES | Is there a type="" attribute whose value is a plugin type? ============================================-. | | | | | NO | | V NO YES | | Is there a Content type? ========-> Is there a type="" attribute? ==========> Let TYPE be type="" | | | | attribute value | | | YES | NO | | V NO V | V | +-<============== Is it text/plain or application/octet-stream? `==> Let TYPE be =====>+ | | | | Sniffed type | | | | text/plain | octet-stream V | | V YES V Is TYPE | | Does the page sniff as binary? ======> Is there a type="" attribute? application/octet-stream? | | | | | | | | | | NO | YES | NO | YES | NO | | | | YES V V | | | | application/octet-stream? =====> Extension that is plugin type? | | | | | | | | | | | | NO | NO | YES | | | | V | | | | | | Type attribute is XML or YES V | | | | | doesn't start with image/* ======> FALLBACK | | | | | and is not a plugin type? | | | | | | | | | | | | NO | | V V V V V V Use Use Use Use it (will be Use Use type="" Content-Type text/plain bitmap or plugin) extension TYPE attribute | | | | | | | V V V V | `================->-+========================================>-+==============>-+-<============-+-<==============+-<======' | V Continue following rules in the spec, which might result in a plugin, a browsing context, an image, or using fallback, depending on the UA and the type.