Key Points:
- Microsoft is deprecating the non-standard getHostEnvironmentValue() method in Edge browser in favor of the standardized User-Agent Client Hints API.
- The deprecation plan starts with Edge version 135, with the method still present but warning developers to test and remove it.
- Developers can test the removal of the method early, and alternative standards-based solutions are available for four properties provided by getHostEnvironmentValue().
Microsoft announced plans to deprecate the non-standard getHostEnvironmentValue() method in Edge browser as part of its efforts to enhance browser privacy by eliminating user fingerprinting. The company aims to replace it with the standardized User-Agent Client Hints API, which provides browser and platform information in a more privacy-preserving way.
According to Microsoft, the User-Agent Client Hints API offers low-entropy hints that are accessible with every request, while high-entropy hints that can give away more fingerprinting information can be gated with user preferences or behind a permission request. The company encourages developers to use the API to provide necessary information without compromising user privacy.
To facilitate the deprecation process, Microsoft will follow a three-step plan. Starting with Edge version 135, the method will remain present but will display a warning to developers. In Edge 137, the method will be disabled but can be temporarily enabled through a feature flag. The company plans to completely remove the legacy method with Edge 141, tentatively scheduled for October 2025.
To test the removal of the getHostEnvironmentValue() method early, Microsoft provides a feature flag. By enabling the flag, developers can locally disable the method in Edge and check whether their website still functions correctly.
The company is also introducing a warning in the DevTools Console tool for sites that still use the legacy method. Additionally, developers will have the option to request a temporary extension for their domain if they cannot remove the getHostEnvironmentValue() method by the scheduled timeframe.
Alternatives to the deprecated method
For developers who use the getHostEnvironmentValue() method, the User-Agent Client Hints API provides standards-based alternatives for four of the five properties it accesses. If a use case isn’t covered by the User-Agent Client Hints API, Microsoft encourages developers to provide feedback so the company can improve the API or identify alternative solutions.
To raise awareness and provide feedback, developers can complete the Feedback on Deprecation of Get Host Environment Value API form. They can also report any bugs or limitations found in the User-Agent Client Hints API on the Chromium’s bug tracker.
Read the rest: Source Link
You might also like: Try AutoCAD 2025 for Windows, best free FTP Clients on Windows & browse Windows games to download.
Remember to like our facebook and our twitter @WindowsMode for a chance to win a free Surface every month.
Discover more from Windows Mode
Subscribe to get the latest posts sent to your email.