html - How to disable Safari Reader in a web page -
i'm curious know more triggers reader option in safari , not. wouldn't plan implement disable it, curious technical exercise.
here i've learned far basic playing around:
- you need @ least 1 h tag
- it not go character count alone number of p tags , length
- probably looks sentence breaks '.' , other criteria
safari provide 'reader' if, h tag, , following:
- 1 p tag, 2417 chars
- 4 p tags, 1527 chars
- 5 p tags, 1150 chars
- 6 p tags, 862 chars
if subtract 1 character of above, 'reader' option not available.
i should note character count of h tag plays part sadly did not realize when determined results above. assume 20+ characters h tag , fixed throughout results above.
some other interesting things:
- setting
<p style="display:none;">
p tags removes them count - setting
display
none
, , showing them 230ms later javascript avoided reader option too
i'd interested if can determine in full.
“you need @ least 1 <h*>
element” — incorrect. here’s example: http://mathiasbynens.be/demo/safari-reader-test-3
my answer on other safari reader question provides more info.
you read my blog post on enabling safari reader findings on subject.
Comments
Post a Comment