Prevent show simplified view prompt or work with s

2020-06-03 06:32发布

问题:

I have a website which looks good if viewed the way I designed it. Every time I visit it from Chrome on Android, I am given a prompt along the bottom of the screen to "Show Simplified View". If I click that prompt to actually see it in simplified view, the site will only display 1 news item (there are supposed to be 25 on a page), it removes all controls (log in, add news item, comments), and scrolling doesn't work anymore. There are multiple other problems as well (headlines/images/article excerpts are not matched together, color scheme is missing, etc.) This happens only on Google Chrome, no other browser I've tested does this.

I don't see the prompt to switch to simplified view on other sites. My preference would be to place a tag on my site to never show this prompt. I have googled around for that, but I have only found articles about how to turn the feature on from Chrome, nothing about how to disable the feature from the server side.

My second thought might be to work with this simplified view and get it functional for people who want to use it. However, I have read that it also blocks all advertising and my site is supported solely by ads, so this is a distant second if I absolutely can't prevent the prompt from appearing.

TO SUM UP:

  1. How can I prevent the "Show simplified view" prompt from appearing or
  2. Failing that, how do I set up my site to work with simplified view?

回答1:

The answer I found for this was to change the font size based on the media width, and once the font size was big enough to be readable on the mobile device I was using, it stopped suggesting the simplified view. The exact code used was:

@media (max-width: 540px) {
    body {
        font-size:18px !important;
    }
}

Simple enough.



回答2:

Replace P tags with div in your page. this mode is also known as Reader mode. Probably this answer might help you.



回答3:

Also check your viewport settings for mobile devices. I received this popup when I changed the initial scale of the viewport to 0.6.

Basically Google recognised that the font size is too small. Looks good to me but probably not for visitors without perfect eyesight.

<meta name="viewport" content="width=device-width, initial-scale=0.6, maximum-scale=2">

In this case, changing initial-scale=1 will fix this



回答4:

G'day mate. There's a permanent solution. Go into chrome://flags and search 'reader mode' and disable both flags which has 'reader mode' on it's name. And then, it's done, you'll never be annoyed by that pop-up again(unless you will uninstall and reinstall that chrome browser and then. ........ .... you'll have to do it again). Thanks mate,bye.