Microsoft releases new Web APIs to optimize web pages for dual screen and foldable devices

Microsoft releases new Web APIs to optimize web pages for dual screen and foldable devices

Foldables are the future…or at least that’s what a lot of Android OEMs are hoping it to be. Samsung is investing heavily in the foldable ecosystem, and its latest foldable, the Samsung Galaxy Z Fold 2 has widely been hailed as the best take yet on this form factor. Microsoft is also pushing the foldable form factor ahead, albeit with a dual-display agenda, and it has landed itself a product that bears promise for the future in the form of the Micrsoft Surface Duo. There’s definitely room to improve, and so, Microsoft has released new Web APIs that will aid in optimizing web pages for dual screen and foldable devices.

Dual screen smartphones and foldable face a two-fold (heh) challenge in current times: not only do they have to get the hardware right, but they also need to focus on getting the software right in a way that brings out utility from the form factor over and above a normal smartphone. OEMs can’t do it alone, and they need active interest from third-party developers to prepare the experience ecosystem for this budding category that holds immense future potential.

Consequently, Microsoft has announced two new Web APIs, namely a CSS screen-spanning media feature and a JavaScript window segments enumeration API. While both foldables and dual-screen devices will allow websites to function as they normally would on a conventional smartphone, it makes sense for the website to recognize the different hardware and level up its utility when the hardware allows for it. For instance, a website on these two device categories could function as it would on a regular smartphone, or recognize the larger display area and work in a tablet mode and offer complementing functionality side-by-side, or go a step further and align the overall view in line with the hardware boundaries as they exist. On the last use case, the content area will neither be cut nor be masked by the device hinge, nor be rendered over the fold of a flexible display.

Microsoft goes into better detail in its announcement, with a note on future proofing for an even wider variety of foldable and multi-screen smartphones. If you are interested, we would highly recommend reading their write up on the same.

About author

Aamir Siddiqui
Aamir Siddiqui

I am a tech journalist with XDA since 2015, while being a qualified business-litigation lawyer with experience in the field. A low-end smartphone purchase in 2011 brought me to the forums, and it's been a journey filled with custom ROMs ever since. When not fully dipped in smartphone news, I love traveling to places just to capture pictures of the sun setting. You can reach out to me at [email protected]