[jQuery] ¸ð¹ÙÀÏ·Î Á¢¼ÓÇß´ÂÁö PC·Î Á¢¼ÓÇß´ÂÁö ±¸ºÐ ¹æ¹ý
¹ÝÀÀÇü À¥À» ¸¸µé´Ù°¡ ¶È°°Àº À¥Àε¥ ¸ð¹ÙÀÏ·Î Á¢¼ÓÇß´ÂÁö, PC·Î Á¢¼ÓÇß´ÂÁö¸¦ jQuery ·Î ±¸ºÐÇؾßÇÏ´Â°Ô ÇÊ¿äÇß´Ù.
±×·¡¼ °Ë»öÇÏ´Ù°¡ jQuery.browser
·Î »ç¿ëÇÑ ¿¹½Ã¸¦ º¸°í ¾²·Á°íÇߴµ¥
jQeury.browser($.browser)°¡ Browser Detection ¹®Á¦·Î jQuery 1.9¿¡¼´Â »èÁ¦ µÆ´Ù´Â Á¤º¸¸¦ ¹ß°ßÇß´Ù.
$.browser: Ever since jQuery 1.4, we¡¯ve been evangelizing that browser detection via the user agent string is a bad idea. Yet we¡¯ve been an enabler of bad practice by continuing to offer $.browser. As of jQuery 1.9 we¡¯ll remove it entirely and you¡¯ll need to use the 1.9 compat plugin. If your code isn¡¯t weaned off browser detection yet, check out Modernizr for a very thorough set of feature detections you can use instead. And of course, you¡¯re welcome to read the tea leaves in the navigator.userAgent string directly, there¡¯s nothing stopping you but your conscience.
jQuery¿¡¼´Â $.support
¸¦ ÀÌ¿ëÇϰųª º°µµÀÇ pluginÀ» ÃßõÇÑ´Ù°í µÇ¾î ÀÖ¾úÁö¸¸,
Á» ´õ ã¾Æº» °á°ú navigator
¸¦ »ç¿ëÇÏ´Â ´Ù¸¥ °£´ÜÇÑ ¹æ¹ýÀ» ã¾Ò´Ù.
µü ¸ð¹ÙÀÏÀÎÁö PCÀÎÁö ±¸ºÐÇϱâ À§ÇÔÀ̶ó¸é ´ÙÀ½ ¼Ò½º¸¦ ±×´ë·Î »ç¿ëÇصµµÈ´Ù
var filter = "win16|win32|win64|mac|macintel";
if ( navigator.platform ) {
if ( filter.indexOf( navigator.platform.toLowerCase() ) < 0 ) {
//mobile
alert('mobile Á¢¼Ó');
} else {
//pc
alert('pc Á¢¼Ó');
}
}
Ãß°¡·Î °¢ ¾ð¾îº°·Î ¸ð¹ÙÀÏÀÎÁö PCÀÎÁö ±¸ºÐÇØÁÖ´Â ¼Ò½ºÄڵ带 Á¦°øÇØÁÖ´Â »çÀÌÆ®¶ó°íÇÑ´Ù.
PHP ·Î µÈ ¼Ò½ºÄڵ带 ´Ù¿î¹Þ¾Æ ¾óÇÍ º¸´Ï ±×·²½ÎÇѵ¥ »ç¿ëÀº ¾ÈÇغôÙ
Âü°íÇϽǺÐÀº µé¾î°¡º¸½Ã±æ..
http://detectmobilebrowsers.com/
Âü°í»çÀÌÆ®
http://wooreeweb.com/lecture/archives/1705
Ãâó: http://88240.tistory.com/393 [shaking blog]