Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
IE, Blink and WebKit all have
Can we specify this? The concept itself is already referenced as "an implementation-defined or user-specified default character encoding" in HTML's determining the character encoding, and assuming the side effects of that are observable, this wouldn't actually expose new information about users.
This should probably be blocked on Document.charset.
I don't see legitimate use case for this. As a Web author, you should always use UTF-8 and declare that you are using UTF-8. At that point, what's the use case for knowing what the default would have been?
If someone tries to use it for something, what non-harmful uses it could have? I can think of a harmful use case: trying to guess what encoding to use for downloadable text files. (Correct way: Use UTF-8 BOM for downloadable text/plain and use Python, etc. -specific encoding declarations for downloadable scripts with #!.)
So I see this as useless and harmful if used, so I think we shouldn't spec this.
Can you tell if the Blink usage comes from "let's check everything" fingerprinting ad tech (not worth catering to)?
I don't know of any reason to use this API, my only concern is that it's supported in all engines except Gecko and usage is fairly high. Unfortunately, the use counter system can't answer interesting questions like "is this due to enumeration" or "is this always used with a fallback." I'll do a httparchive search to get some idea about how it's used in the wild.