Maybe you’ve found a bug in Safari, since it’s reporting different values for essentially the same visible areas. Whatever the reason for these different values, if used for detecting an iPad mini it will give false positives in some situations on other iPads.