Changes between Initial Version and Version 1 of Ticket #3149, comment 4


Ignore:
Timestamp:
10/06/2015 08:31:49 AM (4 years ago)
Author:
pavelz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3149, comment 4

    initial v1  
    1 A word of caution: this is going to have questionable results. It works reliably only on sites which declare `<link rel="canonical">`, like amazon, yelp, or heise.de. On the rest, the best we can do is to hack the `User-Agent` request header and cross fingers. Even when it works, it has a major UX drawback: the User Agent cannot be changed for an already running tab with an existing history. A new tab must be created. I did a quick check with Dolphin and it seems to be doing that. Nothing happens right when you ask for a desktop version, and only the newly created tab is displaying desktop versions of all subsequently loaded sites. Safari apparently, according to the internets, used to have desktop switch in iOS8, but i could not find it in iOS9. Opera and Mercury offer simply the UA change, cowardly not even linking it to the desired desktop effect. Chrome seems to be hooking only on the `<link>` because it retains the tab and its history, but it does display the mobile version again, more often than not. 
     1A word of caution: this is going to have questionable results. It works reliably only on sites which declare `<link rel="canonical">`, like amazon, yelp, or heise.de. Many high profile sites don't, i just tried cnn.com. There, the best we can do is to hack the `User-Agent` request header and cross fingers. Even when it works, it has a major UX drawback: the User Agent cannot be changed for an already running tab with an existing history. A new tab must be created. I did a quick check with Dolphin and it seems to be doing that. Nothing happens right when you ask for a desktop version, and only the newly created tab is displaying desktop versions of all subsequently loaded sites. Safari apparently, according to the internets, used to have desktop switch in iOS8, but i could not find it in iOS9. Opera and Mercury offer simply the UA change, cowardly not even linking it to the desired desktop effect. Chrome seems to be hooking only on the `<link>` because it retains the tab and its history, but it does display the mobile version again, more often than not. 
    22 
    33I am open for examples of how 3rd party browsers are correctly handling the desktop version request, with an acceptable UX. I haven't seen such yet.