Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

Learn More

How can I ensure my web content appears in Reader view?

  • 8 답장
  • 2 이 문제를 만남
  • 2 보기
  • 최종 답변자: Huwami

more options

What rules do I need to follow to ensure that content appears in the Reader view mode?

What rules do I need to follow to ensure that content appears in the Reader view mode?

선택된 해결법

jscher2000 said

A scoring system is used to identify the "main" section of the content, but I don't know how to document it without extensive experimentation Maybe you can follow it better than I can: https://dxr.mozilla.org/mozilla-release/source/toolkit/components/reader/Readability.js#625 (_grabArticle function)

Thanks very much. I'll pass it on to a techie to make sense of it.

문맥에 따라 이 답변을 읽어주세요 👍 0

모든 댓글 (8)

more options

Unfortunately, there is not a lot of documentation on this topic.

In most cases, Reader View will work on any website that is structured with the correct HTML tags that are standard. I know, for example, that it is very important to have your blog post, page content or whatever it may be wrapped within the <article> HTML tag.

Here are some web pages that I found about the topic:

I hope this helps.

글쓴이 Wesley Branton 수정일시

more options

Thanks very much. Answers my question but unfortunately doesn't solve my problem. I'll keep an eye open for any new documentation.

Huwami

글쓴이 Huwami 수정일시

more options

Do you have a link to your website? I can take a look to see how you can fix it to make it work with Reader View.

more options

I apologise for the late reply

The website is https://nice.org.uk

These are examples of the pages that don't work:

  1. https://www.nice.org.uk/guidance/QS134
  2. https://www.nice.org.uk/guidance/qs28

The bullet points at the end are lost

https://www.nice.org.uk/standards-and-indicators/how-to-use-quality-standards#identify - the link at the end is lost

more options

On the first two examples, it seems Reader View uses just the contents of the <article> tag.

On the third one, it looks like a random chunk ("Measure the quality of care" section, without that heading) is pulled out of the middle to display in Reader View. I don't know what is going on there, but it's a bit of a tag soup...

more options

I suppose what I'm really looking for is documentation that can be given to developers and web team members to ensure that any pages they write or generate via templates they develop will be able to be displayed as expected in reader view mode if they follow given rules.

I'm not a developer but I do find the feature very helpful. It's a pity Mozilla doesn't promote it more.

If that documentation doesn't exist it would be nice for Mozilla to let everybody know whether it can be expected in future.

more options

A scoring system is used to identify the "main" section of the content, but I don't know how to document it without extensive experimentation Maybe you can follow it better than I can:

https://dxr.mozilla.org/mozilla-release/source/toolkit/components/reader/Readability.js#625 (_grabArticle function)

more options

선택된 해결법

jscher2000 said

A scoring system is used to identify the "main" section of the content, but I don't know how to document it without extensive experimentation Maybe you can follow it better than I can: https://dxr.mozilla.org/mozilla-release/source/toolkit/components/reader/Readability.js#625 (_grabArticle function)

Thanks very much. I'll pass it on to a techie to make sense of it.