START | V Is there a Content-Type and is the UA going to obey it blindly? | | | YES | NO | V YES | Is there a type="" attribute whose value is a plugin type? ---------. | | V | | NO YES ,--->-+ | V NO | | | Is there a Content type? ----->-+-> Is there a type="" attribute? | | | ^ | | | | YES `------------------------. | NO | V NO V | | | +-<-------------- Is it text/plain or application/octet-stream? | `----)|(-----> Is there an extension? | | | | | | | | | text/plain | octet-stream | | | YES | NO | V V | | V V | Does the page sniff as binary? Set S flag -------' | Use Sniff | | | | extension | | | NO | YES | | | | V NO V YES V | | | +-<--------- Is there a type="" attribute? ------> Set S flag -->-+ | | | | | | | | | V | | V V Use | | Use Use type="" | | Content-Type text/plain attribute | | | | | | | | V V V | `----------------->-+--------------------------------------------------------------> END <------+-<--------------' S flag means that if the resulting type is an XML type, or is a type that doesn't start with "image/", then fallback is used instead. (i.e. if the S flag is set, only plugins and unscripted bitmap images are supported.)