Blog

Why Foldable Phones Confuse Device Classification

Foldable devices present a problem for detection systems that predates them conceptually but is now unavoidable: a single device that is legitimately two form factors.

Classification assumes a fixed form factor

Detection systems map a device to a class such as phone or tablet, and that class then drives layout and asset decisions for the whole session.

The mapping assumes the class is a property of the hardware. On a device that folds, the class changes while the page is open.

Nothing in the user agent changes when it does, because the string describes the model rather than the current state.

The identity is stable and the geometry is not

The device model reported is the same in both configurations, which is correct: it is the same device. The available space is entirely different.

A system deciding layout from identity therefore produces the same decision for two situations that need different ones.

The failure is not a coverage gap that a dataset update fixes. The information simply is not in the header.

The viewport reports the change immediately

Media queries re-evaluate and script events fire when the available space changes, exactly as they do on window resizing.

A responsive design therefore handles folding without any awareness that folding is what happened. The mechanism was already in place.

This is the same argument as for window resizing, which is why designs built for resizable windows tend to handle these devices well already.

Layout can span a physical hinge

Some devices have a physical seam across the display, and content placed across it is split. Knowing the space is not enough to place content well.

Platform interfaces expose the position of such a seam so layouts can avoid it, which is a genuine case where extra information is required.

That information comes from the platform at the moment it applies, not from an identity string parsed at request time.

The general lesson about classification

Foldables make visible a weakness that was always there: device class is a summary, and summaries lose the property that actually varies.

Any hardware that changes its usable geometry while running breaks identity-based classification in the same way, and more such hardware keeps appearing.

Designing against measured conditions rather than against a class means these devices arrive as ordinary cases rather than as exceptions to handle.