Primary eng (and PM) emails
Summary
Remove the readonly attribute defaultCharset from Document, which returns the fallback encoding used in some cases when the encoding could not be determined by any other means.
Motivation
This is non-standard, and my suggestion to standardize it was not met with enthusiasm. To quote Henri Sivonen of Mozilla:
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.
Interoperability and Compatibility Risk
Standardizing would probably be a faster way to at least surface-level interop, but there is no interest in adding this in Gecko, for good reasons. Removing it will lead to decreased interoperability on the WebKit-dominated mobile web in the short term.
The use counter (see below) does show that this attribute is hit fairly often, 0.5% of page views. This is much higher than what we would usually consider acceptable, so I have searched the httparchive data from 20150101 for occurrences of "defaultCharset" and categorized the results.
Alternative implementation suggestion for web developers
Assume no fallback encoding and instead declare the encoding of all resources.
Usage information from UseCounter
https://www.chromestatus.com/metrics/feature/timeline/popularity/428
Usage is around 0.5%. See above for why removal is still likely to be safe.
OWP launch tracking bug
https://crbug.com/567738
Entry on the feature dashboard
https://www.chromestatus.com/features/6217124578066432
The entry is assuming that deprecation will happen in M49, I will update it if not.
Requesting approval to remove too?
Yes, I'd like to include removal in this intent too. However, I'd like to do the removal after the next branch point, so that there's one release cycle with a deprecation message.--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].