To detect iPad Mini in HTML5 and JavaScript, we check the screen
propeerties.
For instance, we write
const isIpadMini = screen.availWidth === 768 && screen.availHeight === 1004;
const isIpadMini2 = screen.availWidth === 748 && screen.availHeight === 1024;
to get the screen’s available width with the screen.availWidth
property.
We get the screen’s available height with the screen.availHeight
property.
We compare their widths and heights to check the iPad Mini version.