[Resolved] switching to "Desktop Site" in Chrome on iOS not working

Home Forums Support [Resolved] switching to "Desktop Site" in Chrome on iOS not working

Home Forums Support switching to "Desktop Site" in Chrome on iOS not working

  • This topic has 5 replies, 2 voices, and was last updated 5 years ago by Maria Cecilia.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #825970
    Maria Cecilia

    When I select “Desktop Site” in Chrome on Android it works fine. However, on iOS it’s not working. In my child theme I can detect that it’s on mobile and on the front page using the following check (the is_mobile() function is defined in the plugin “mobble”):
    if ((is_mobile() || is_ios()) && is_front_page())

    The above result will change when I switch from “Mobile Site” to “Desktop Site” in Chrome.

    How can I force GeneratePress to be “not responsive” on iOS? It doesn’t automatically do this (like it should) when I switch to “Desktop Site” in Chrome on iOS (but it does on Android).

    The “Desktop Site” option changes the $_SERVER[‘HTTP_USER_AGENT’]).

    #826089
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I’m not 100% sure this plugin still works, but it’s worth a shot: https://wordpress.org/plugins/generate-disable-mobile/

    People typically don’t want to disable the mobile mode, so we haven’t maintained it much.

    That will disable the mobile mode for all devices.

    Not sure it’s not working by default on iOS, I’ll need to debug that.

    #826378
    Maria Cecilia

    Hi Tom,

    That plugin doesn’t seem to work anymore. In any case, I was just looking for a way that someone could switch to the desktop display. I solved it by asking them to use this browser:
    https://itunes.apple.com/us/app/desktop-browser/id940076212?mt=8

    Thanks,
    Jon

    #826585
    Maria Cecilia

    Hi Tom,

    On my home page, I have two columns. Column one contains posts from category one and column two has posts from category two. On the desktop, you can see all the recent posts at the top of the page. When I switch to a mobile device it moves column one underneath column two and in this case, you have to scroll down to see the recent posts from category one. A better responsive design would be to send the posts from the server client side as a table and then use javascript to decide how to display the posts. The table would have a column for each of the post fields. Then the javascript could decide on how to display the posts based on the type of device (e.g., desktop, tablet, or phone). On mobile, it could order the posts by date, while on the desktop it could use the two column format. Maybe, an enhanced version of your WP Show Posts plugin?

    Thanks,
    Jon

    #826651
    Tom
    Lead Developer
    Lead Developer

    Hey Jon,

    Sounds like an interesting idea – I’ll give it some thought!

    Thanks! 🙂

    #826739
    Maria Cecilia

    Hi Tom,

    One way to do it would be to call wpsp_display twice (with different options) to get the single column and two column versions of the page. Then call json_encode on these two versions and pass it to the javascript. Then the javascript could decide which one to insert into the HTML. Not the most efficient way (since the server side needs to generate two versions of the page), but I think it could work.

    Thanks,
    Jon

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.