A
A
Alexander Alekseev2019-06-11 13:35:43
safari
Alexander Alekseev, 2019-06-11 13:35:43

How does the Desktop or Full Site button work on mobile browsers?

Interested in the mechanism of the button
operation Is the user agent replaced? Viewport?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Korobkov, 2019-06-11
@BorisKorobkov

I need to make this button work on my resource, and more specifically, make a desktop site from an adaptive site when you click on this button

Option 1: A regular link to a different URL (eg example.com <-> m.example.com) with a different design
Option 2: Set a cookie and reload the page. Parse the cookie on the server and display the desired design.
Option 3. Still use adaptive design, and by clicking on the button, load css that changes the design

M
mletov, 2019-06-11
@mletov

The user agent is parsed and the appropriate markup / styles are slipped.
Although more often they just make an adaptive site using a media query without any buttons.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question