JavaScript iPad detection

In: JavaScript

July 07th, 2010.

These days, there is big buzz about iPad. I guess a lots of developers will pay more attention to iPad platform. Therefore, here is the JavaScript iPad detection snippet that might be useful.

function is_iPad() {
	return (navigator.userAgent.match(/iPad/i) != null);
}

Written by

Dejan is pragmatic software developer with Master's Degree in Computer Science. He is currently based in Belgrade (Serbia).