How to disable firefox's reader view from my website?
Asked Answered
T

5

7

Today i updated my firefox to the latest version and one big feature is the reader view for desktop. We launched a webshop two weeks ago and now there is this tiny "reader view" icon. When i click on it i get an error-message. My team-leader wants me to remove this feature when visiting this site.

is it possible to remove or hide the "reader view" feature from firefox when visiting my site?

Traynor answered 3/6, 2015 at 9:3 Comment(3)
notify the user to disable or not use the reader feature of firefox, it is the best, instead of forcing options to the user, since she may never visit again, imoRoselynroseman
How about fixing the site properly instead?Thomey
Note to anyone coming here trying to do this: DON'T! Never intentionally take this sort of thing out of the hands of the user. A lot of people use FireFox because they want control over their internet lives, and if you try to cripple FireFox's features you are betraying their trust!Coxalgia
S
11

There is currently no legit way of disabling Reader View for your website. Reader View is supposed to automatically detect on what pages it should be available and on what pages it should not.

If there is an issue with your website, your best option is probably to report it there: https://github.com/mozilla/readability/issues

You can also find more info about the issues affecting Reader View in Firefox there: https://wiki.mozilla.org/QA/Reader_view

Although I would not recommend it, there might be a way to fool Reader View into thinking it should not parse your website, if you really need to. A quick look at the source code reveals that it will not parse certain type of documents, certain URIs and malformed URLs. You would need to dig in the source to understand how/if your site can safely be adapted to avoid being parsed. The Reader View source code can be found here: https://mxr.mozilla.org/mozilla-release/source/toolkit/components/reader/ReaderMode.jsm or https://dxr.mozilla.org/mozilla-release/source/toolkit/components/reader/ReaderMode.jsm

Stated answered 5/6, 2015 at 15:55 Comment(3)
Thanks for the informations mate! I guess you're right and i shouldn't try to manipulate something from the browser. The thing is it's a shop and nobody needs the reader-feature while shoppingTraynor
The real question is, why they would want to click on it? It's not mandatory to click every icon you see.Kondon
@moesphemie, That's not necessarily true. Sometimes I simply use the Reader View to reduce the amount of light coming out of my screen (since it has a dark theme), and while a list of products might not be something I would use it on (I certainly don't mind it being there, even if I don't need it), I might use it on a single product page if the description was wordy enough.Coxalgia
S
3

This Question shows how to Optimize website to show reader view in Firefox. So you have to ensure that your site is not optimized for the Reader View.

Don't use formatting options that are favoured for the Reader View and so on.

I guess this will suffice:

  • Don't use the <p> Tag
  • write all Textblocks in small portions

Here are some more details about the mechanism

Sparid answered 28/6, 2015 at 7:7 Comment(0)
D
2

Replace p tags with div tags in your page. It worked for me, even when I have div tags with pre tags (preformatted text) on the same page.

Directorate answered 11/3, 2021 at 1:37 Comment(0)
I
1

There is no way of forcing disabling the Reader View to the user, But if it is important to your site, you can notify the user to disable or not use the reader feature of firefox.

This would be the way to Disable the Reader on the users browser

  • in the Enter about:config in browser address bar
  • click the "I'll be careful I promise" box
  • search for reader.parse-on-load.enabled
  • toggle preference to false (right click > toggle to false )
  • close the about:config page > refresh browser > reader view icon has gone
Inspector answered 4/6, 2015 at 1:28 Comment(3)
Welcome to Stack Overflow. I believe the OP wants to edit this from the site itself, not the user changing their own settings.Slump
In light of Nikos M's reply of " notify the user to disable or not use the reader feature of firefox, it is the best, instead of forcing options to the user, since she may never visit again, imo " I thought that explaining how this is achieved would be of useInspector
As a user, I want to disable "reader view" button, and this option takes care of it. Found this answer from a ddg search of firefox 57 disable reader view.Annamaeannamaria
A
-9

put this code on your css code and you are done !

/* CSS Reset */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,
p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,
img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,
dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,
thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,
footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,
audio,video,adnav,adheader{
    margin:0;
    padding:0;
    border:0;
    font-size:100%;
    font:inherit;
    vertical-align:baseline;
}
Armagh answered 23/3, 2016 at 13:4 Comment(3)
Reader View being available or not and CSS reset are two very different things. Unless you can prove with a fully functional, live example, I'd regard this as an answer that does not work.Mathes
Seems to be either a misunderstanding of the original question—or trolling?Hanes
@Hanes maybe both? :DParget

© 2022 - 2024 — McMap. All rights reserved.