{"id":3866,"date":"2013-07-10T22:57:33","date_gmt":"2013-07-10T21:57:33","guid":{"rendered":"http:\/\/flaven.fr\/?p=3866"},"modified":"2013-09-28T07:22:31","modified_gmt":"2013-09-28T05:22:31","slug":"mobile-tablette-navigateur-ajouter-des-user-agents-sur-safari-pour-tester-le-responsive-design-de-votre-site","status":"publish","type":"post","link":"https:\/\/flaven.fr\/2013\/07\/mobile-tablette-navigateur-ajouter-des-user-agents-sur-safari-pour-tester-le-responsive-design-de-votre-site\/","title":{"rendered":"Mobile, Tablette, Navigateur &#8211; Ajouter des User Agents sur Safari pour tester le responsive design de votre site"},"content":{"rendered":"\n<p><!--  Mobile, Tablette, Navigateur - Ajouter des User Agents sur Safari pour tester le responsive design de votre site --><br \/>\n\t<!--  responsive, Tablette, mobile, navigateur, safari, chrome, User Agent, Windows, Mozilla, Galaxy, Windows, Blackberry, UX, Web, Javascript, PHP --><\/p>\n<p>\tIl est parfois assez compliqu\u00e9 avec la seule utilisation d&#8217;\u00e9mulateurs (android, iOS, Windows Phone&#8230;) de tester de mani\u00e8re correcte un site que l&#8217;on souhaite faire en <code>responsive design<\/code>. En effet, vous \u00eates oblig\u00e9(e) d&#8217;installer le SDK de chaque syst\u00e8me d&#8217;exploitation, de le configurer bref de le faire fonctionner. Or, Safari apporte une solution facile et agile pour rem\u00e9dier \u00e0 ce probl\u00e8me. Pour r\u00e9sumer simplement, vous pouvez d&#8217;une certaine fa\u00e7on cr\u00e9er autant de &#8220;profil&#8221; que vous le souhaitez au sein du navigateur Safari, profils qui sont autant de &#8220;User Agent&#8221; permettant de simuler la vue sur une Tablette ou sur un mobile, fonctionnant sous tous les syst\u00e8mes d&#8217;exploitations du march\u00e9 : iOS, Android, Windows Phone, BlackBerry&#8230;etc.<\/p>\n\t\t\t\t\t<div class=\"textwidget-unique text\">\n\n\t\t\t\t\t        <div class=\"textwidget-photo\">\n\t\t\t\t\t                <a href=\"https:\/\/flaven.fr\/books\/responsive-web-design-n4\/\" class=\"photo\" title=\"Responsive Web design, N\u00b04\"><img loading=\"lazy\" decoding=\"async\" alt=\"Responsive Web design, N\u00b04\" src=\"http:\/\/ecx.images-amazon.com\/images\/I\/41JKeLWpIkL._SL160_.jpg\" width=\"104\" height=\"160\"><\/a>\n\t\t\t\t\t            <\/div>\n\t\t\t\t\t\t<div class=\"info half\">\n\t\t\t\t\t\t\t<h2 class=\"product-title\"><a class=\"head\" href=\"https:\/\/flaven.fr\/books\/responsive-web-design-n4\/\" title=\"Responsive Web design, N\u00b04\">Responsive Web design, N\u00b04<\/a><\/h2>\n\t\t\t\t\t\t\t\n\t\t\t\t\t        <p class=\"product-excerpt\">Un tour d'horizon rapide et pragmatique sur les questions de responsive Web design afin de concevoir des exp\u00e9riences UX multi-plateformes (mobile, tablette et web)<\/p>\n\t\t\t\t\t\t\t\tGenre(s) : <a href=\"https:\/\/flaven.fr\/book-type\/agile\/\" rel=\"tag\">Agile<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/applications\/\" rel=\"tag\">Applications<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/html5\/\" rel=\"tag\">HTML5<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/ihm\/\" rel=\"tag\">IHM<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/jquery\/\" rel=\"tag\">jQuery<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/marketing-digital\/\" rel=\"tag\">Marketing<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/mobile\/\" rel=\"tag\">Mobile<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/mockup-agile\/\" rel=\"tag\">Mockup &amp; Agile<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/marketing-multicanal\/\" rel=\"tag\">Multicanal<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/responsive-web-design-agile-ux\/\" rel=\"tag\">Responsive Web design<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/tablette\/\" rel=\"tag\">Tablette<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/webdesign-responsive-agile\/\" rel=\"tag\">Webdesign<\/a>, <a href=\"https:\/\/flaven.fr\/book-type\/wireframe-agile\/\" rel=\"tag\">Wireframe &amp; Agile<\/a><br>\n\t\t\t\t\t<div class=\"but-wrap\"><a href=\"http:\/\/www.amazon.fr\/Responsive-Web-design-Ethan-Marcotte\/dp\/2212133316%3FSubscriptionId%3DAKIAJYB2QGGQOTHQLRPA%26tag%3Dhecubenet-21%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D2212133316\" class=\"button\"><span><i class=\"more\"><\/i>+ d'infos<\/span><\/a><\/div>\n\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\n<h4>Un tour d&#8217;horizon des &#8220;User Agent&#8221;<\/h4>\n<p>On liste ici les principaux user agent notamment en faisant tout de m\u00eame la distinction entre les tablettes et les mobiles, car tr\u00e8s souvent les exp\u00e9riences, l&#8217;UX et les IHM que l&#8217;on con\u00e7oit pour un site diff\u00e8re quelque peu selon la taille de l&#8217;\u00e9cran&#8230; en attendant la t\u00e9l\u00e9vision connect\u00e9e bien s\u00fbr.<\/p>\n<p>Voici un rapide tour d&#8217;horizon non exhaustif des &#8220;User Agnet&#8221; dont vous aurez sans doute besoin. Il en existe assur\u00e9ment un bien plus grand nombre mais pour des raisons pratiques et pragmatiques, nous ne donnons que les principaux.<\/p>\n<p>\t<b>Dans la famille &#8220;Android&#8221;&#8230;<\/b><\/p>\n<ul>\n<li>Le <code>User Agent<\/code> pour une tablette Galaxy qui fonctionne avec Android sera la suivant :<br \/>\n\t<code>Mozilla\/5.0 (Linux; Android 4.0.4; GT-P7510 Build\/IMM76D) AppleWebKit\/535.19 (KHTML, like Gecko) Chrome\/18.0.1025.166 Safari\/535.19<\/code><\/li>\n<li>Le <code>User Agent<\/code> pour un Galaxy Note (mobile) qui fonctionne avec Android sera la suivant :<br \/>\n\t<code>Mozilla\/5.0 (Linux; Android 4.0.4; GT-N7000 Build\/IMM76D) AppleWebKit\/535.19 (KHTML, like Gecko) Chrome\/18.0.1025.166 Mobile Safari\/535.19<\/code><\/li>\n<\/ul>\n<p><i>Source : <a href=\"http:\/\/docs.oracle.com\/cd\/E14004_01\/books\/ConnMobApps\/ConnMobApps_Setup8.html\" target=\"_blank\">http:\/\/docs.oracle.com\/cd\/E14004_01\/books\/ConnMobApps\/ConnMobApps_Setup8.html<\/a><\/i><\/p>\n<p><b>Dans la famille &#8220;Windows Phone&#8221;<\/b><br \/>\nQuelques membres de l&#8217;honorable famille &#8220;Windows Phone&#8221;&#8230;<\/p>\n<ul>\n<li>Le User Agent Windows Phone 7<br \/>\n<code>Mozilla\/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident\/3.1; IEMobile\/7.0; LG; GW910)<\/code><\/li>\n<li>Le User Agent Windows Phone 7.5<br \/>\n<code>Mozilla\/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident\/5.0; IEMobile\/9.0; SAMSUNG; SGH-i917)<\/code><\/li>\n<li>Le User Agent Windows Phone 8<br \/>\n<code>Mozilla\/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident\/6.0; IEMobile\/10.0; ARM; Touch; NOKIA; Lumia 920)<\/code><\/li>\n<\/ul>\n<p><i>Source : <a href=\"http:\/\/jonathanstark.com\/blog\/\" target=\"_blank\">http:\/\/jonathanstark.com\/blog\/<\/a><\/i><\/p>\n<p><b>Dans la famille &#8220;BlackBerry&#8221;<\/b><br \/>\nLa famille des terminaux &#8220;M\u00fbre&#8221; (aka BlackBerry en anglais) est d&#8217;une tr\u00e8s grande vari\u00e9t\u00e9. Pour plus d&#8217;information, sur la mani\u00e8re de cibler les terminaux BlackBerry, on vous invite vivement \u00e0 consulter le blog de d\u00e9veloppement de blackberry.com. Il y est expliqu\u00e9 le mod\u00e8le de construction ou la &#8220;pattern&#8221; qui sp\u00e9cifie le &#8220;User Agent&#8221; de chaque mod\u00e8le de Blackberry.<\/p>\n<ul>\n<li>Le mod\u00e8le du &#8220;User Agent&#8221; pour un BlackBerry 10<br \/>\n\t\t<code>Mozilla\/5.0 (BB10; <Device Type>) AppleWebKit\/537.10+ (KHTML, like Gecko) Version\/<BB Version #> Mobile Safari\/537.10+<\/code><\/li>\n<\/ul>\n<p><i>Source : <a href=\"http:\/\/devblog.blackberry.com\/2012\/08\/blackberry-10-user-agent-string\/\" target=\"_blank\">http:\/\/devblog.blackberry.com\/2012\/08\/blackberry-10-user-agent-string\/<\/a><\/i><\/p>\n<p>On vous donne n\u00e9anmoins quelques-uns des users agents nous avons pu cueillir sur le web&#8230;<\/p>\n<ul>\n<li>Le User Agent pour le mod\u00e8le Z10<br \/>\n\t<code>Mozilla\/5.0 (BB10; Touch) AppleWebKit\/537.10+ (KHTML, like Gecko) Version\/10.0.9.2372 Mobile Safari\/537.10+<\/code><\/li>\n<li>Le User Agent pour la tablette BlackBerry<br \/>\n\t<code>Mozilla\/5.0 (PlayBook; U; RIM Tablet OS 2.0.0; en-US) AppleWebKit\/535.8+ (KHTML, like Gecko) Version\/7.2.0.0 Safari\/535.8+<\/code><\/li>\n<\/ul>\n<p>Enfin, un exemple assez complet, o\u00f9 l&#8217;on comprend mieux en pratique le mode d\u00e9termination du mod\u00e8le.<\/p>\n<blockquote><p>\n\tBlackberry Curve: BlackBerry8330\/4.5.0.77 Profile\/MIDP-2.0 Configuration\/CLDC-1.1 VendorID\/105<br \/>\n\tBlackberry Curve 2: BlackBerry8530\/5.0.0.337 Profile\/MIDP-2.1 Configuration\/CLDC-1.1 VendorID\/105<br \/>\n\tBlackberry Storm: BlackBerry9530\/4.7.0.148 Profile\/MIDP-2.0 Configuration\/CLDC-1.1 VendorID\/105<br \/>\n\tBlackberry Storm 2: BlackBerry9550\/5.0.0.287 Profile\/MIDP-2.1 Configuration\/CLDC-1.1 VendorID\/105<br \/>\n\tBlackberry Tour : BlackBerry9630\/4.7.1.40 Profile\/MIDP-2.0 Configuration\/CLDC-1.1 VendorID\/105<br \/>\n\tBlackberry Pearl Flip: BlackBerry8230\/4.6.1.234 Profile\/MIDP-2.0 Configuration\/CLDC-1.1 VendorID\/105<br \/>\n\tBlackberry Pearl: BlackBerry8130\/4.3.0 Profile\/MIDP-2.0 Configuration\/CLDC-1.1 VendorID\/105<br \/>\n\tBlackberry World: BlackBerry8830\/4.2.2 Profile\/MIDP-2.0 Configuration\/CLDC-1.1 VendorID\/105<\/p>\n<p>\tKeep in mind that \u201cVendorID\/105\u2033 specifies Verizon networks.\n<\/p><\/blockquote>\n<p><i>Source : <a href=\"http:\/\/jeffhee.wordpress.com\/2010\/01\/12\/blackberry-user-agent-strings\/\" target=\"_blank\">http:\/\/jeffhee.wordpress.com\/2010\/01\/12\/blackberry-user-agent-strings\/<\/a><\/i><\/p>\n<p><b>Muni de cette arm\u00e9e de &#8220;User Agent&#8221;, on va pouvoir cr\u00e9er, sous Safari, chaque profil pour tester chaque terminal souhait\u00e9.<\/b><\/p>\n<h4>Comment ajouter facilement des <code>User Agents<\/code> \u00e0 Safari<\/h4>\n<p>La premi\u00e8re chose \u00e0 faire est de bien <strong>fermer Safari<\/strong>. Car, on s&#8217;appr\u00eate \u00e0 manipuler un fichier de &#8220;configuration&#8221; du navigateur. On va tout simplement  les <code>User Agents<\/code> trouv\u00e9s plus haut \u00e0 la liste des terminaux disponibles sous le navigateur Safari dans l&#8217;onglet &#8220;D\u00e9veloppement&#8221;.<\/p>\n<p>Evidement, si vous n&#8217;avez pas activ\u00e9 l&#8217;onglet &#8220;D\u00e9veloppement&#8221; dans Safari, activez-le !<\/p>\n<p><b>Comment activer l&#8217;onglet &#8220;D\u00e9veloppement&#8221; ? <\/b><br \/>\n&#8220;Apr\u00e8s avoir lanc\u00e9 Safari, cliquez dans la barre de menu sur Safari>Pr\u00e9f\u00e9rences, puis rendez-vous dans l\u2019onglet Avanc\u00e9es et cochez la case en bas de la fen\u00eatre : \u00ab Afficher le menu D\u00e9veloppement dans la barre des menus \u00bb puis quittez les pr\u00e9f\u00e9rences de Safari.&#8221;<\/p>\n<p><i>Source : <a href=\"http:\/\/www.blogdumac.com\/trucs-astuces\/safari-menu-developpement-382#sthash.Yug6GTAr.dpuf\" target=\"_blank\">http:\/\/www.blogdumac.com\/trucs-astuces\/safari-menu-developpement-382#sthash.Yug6GTAr.dpuf<\/a><\/i><\/p>\n<p>Consid\u00e9rons donc que l&#8217;onglet &#8220;D\u00e9veloppement&#8221; est activ\u00e9 et que Safari est ferm\u00e9 ! Enfin&#8230;. On va donc \u00e9diter la liste des User Agents de Safari contenu dans le fichier <code>UserAgents.plist<\/code><\/p>\n<p><b>On va copier via la console le fichier sur notre bureau puis l&#8217;\u00e9diter.<\/b><br \/>\n<code>cp \/Applications\/Safari.app\/Contents\/Resources\/UserAgents.plist ~\/Desktop\/<\/code><\/p>\n<p><b>En l&#8217;\u00e9ditant, on rajoute les User Agents manquants dans <code>UserAgents.plist<\/code><\/b><\/p>\n<pre lang=\"xml\">\r\n\t<!-- ANDROID  -->\r\n\t<dict>\r\n\t\t<key>separator<\/key>\r\n\t\t<true\/>\r\n\t<\/dict>\r\n\t<dict>\r\n\t\t<key>name<\/key>\r\n\t\t<string>Android Tablet<\/string>\r\n\t\t<key>version<\/key>\r\n\t\t<string>4.0.4<\/string>\r\n\t\t<key>platform<\/key>\r\n\t\t<string>Mac<\/string>\r\n\t\t<key>user-agent<\/key>\r\n\t\t<string>Mozilla\/5.0 (Linux; Android 4.0.4; GT-P7510 Build\/IMM76D) AppleWebKit\/535.19 (KHTML, like Gecko) Chrome\/18.0.1025.166 Safari\/535.19<\/string>\r\n\t<\/dict>\r\n\t<dict>\r\n\t<key>name<\/key>\r\n\t<string>Android Mobile<\/string>\r\n\t<key>version<\/key>\r\n\t<string>2.1<\/string>\r\n\t<key>platform<\/key>\r\n\t<string>Mac<\/string>\r\n\t<key>user-agent<\/key>\r\n\t<string>Mozilla\/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build\/ERD62) AppleWebKit\/530.17 (KHTML, like Gecko) Version\/4.0 Mobile Safari\/530.17<\/string>\r\n\t<\/dict>\r\n\t<!-- \/\/ ANDROID  -->\r\n\r\n\t<!-- WINDOWS PHONE  -->\r\n\t<dict>\r\n\t\t<key>separator<\/key>\r\n\t\t<true\/>\r\n\t<\/dict>\r\n\r\n\t<dict>\r\n\t<key>name<\/key>\r\n\t<string>Windows Mobile<\/string>\r\n\t<key>version<\/key>\r\n\t<string>8.0<\/string>\r\n\t<key>platform<\/key>\r\n\t<string>Mac<\/string>\r\n\t<key>user-agent<\/key>\r\n\t<string>Mozilla\/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident\/6.0; IEMobile\/10.0; ARM; Touch; NOKIA; Lumia 920)<\/string>\r\n\t<\/dict>\r\n\t<!-- \/\/ WINDOWS PHONE  -->\r\n\r\n\t<!-- BLACKBERRY  -->\r\n\t<dict>\r\n\t\t<key>separator<\/key>\r\n\t\t<true\/>\r\n\t<\/dict>\r\n\r\n\t<dict>\r\n\t<key>name<\/key>\r\n\t<string>Blackberry Z10<\/string>\r\n\t<key>version<\/key>\r\n\t<string>10.0.9.2372<\/string>\r\n\t<key>platform<\/key>\r\n\t<string>Mac<\/string>\r\n\t<key>user-agent<\/key>\r\n\t<string>Mozilla\/5.0 (BB10; Touch) AppleWebKit\/537.10+ (KHTML, like Gecko) Version\/10.0.9.2372 Mobile Safari\/537.10+<\/string>\r\n\t<\/dict>\r\n\t<!-- \/\/ BLACKBERRY -->\r\n<\/pre>\n<p><b>Puis on copie notre nouveau <code>UserAgents.plist<\/code> au pr\u00e9c\u00e9dent endroit.<\/b><br \/>\n<code>sudo cp ~\/Desktop\/UserAgents.plist \/Applications\/Safari.app\/Contents\/Resources\/UserAgents.plist<\/code><\/p>\n<p><b>Safari avec le nouveau fichier <code>UserAgents.plist<\/code><\/b><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2013\/07\/user_agent_detect_1.jpg\" alt=\"Mobile, Tablette, Navigateur - Ajouter des User Agents sur Safari pour tester le responsive design de votre site\" width=\"500\" height=\"313\">\t<\/p>\n<p><b>Safari avec le nouveau fichier <code>UserAgents.plist<\/code><\/b><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2013\/07\/user_agent_detect_2.jpg\" alt=\"Mobile, Tablette, Navigateur - Ajouter des User Agents sur Safari pour tester le responsive design de votre site\" width=\"500\" height=\"313\">\t<\/p>\n<p><b>Pour m\u00e9moire, voici le fichier d&#8217;origine <code>UserAgents.plist<\/code><\/b><\/p>\n<pre lang=\"xml\">\r\n\t<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>\r\n\t<!DOCTYPE plist PUBLIC &quot;-\/\/Apple\/\/DTD PLIST 1.0\/\/EN&quot; &quot;http:\/\/www.apple.com\/DTDs\/PropertyList-1.0.dtd&quot;>\r\n\t<plist version=&quot;1.0&quot;>\r\n\t<array>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Safari<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>5.1.9<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>Mac<\/string>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Mozilla\/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit\/534.59.8 (KHTML, like Gecko) Version\/5.1.8 Safari\/534.59.8<\/string>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Safari<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>5.1.6<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>Windows<\/string>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Mozilla\/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit\/534.59.8 (KHTML, like Gecko) Version\/5.1.6 Safari\/534.59.8<\/string>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>separator<\/key>\r\n\t\t\t<true\/>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Safari iOS<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>4.3.3<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>iPhone<\/string>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Mozilla\/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit\/533.17.9 (KHTML, like Gecko) Version\/5.0.2 Mobile\/8J2 Safari\/6533.18.5<\/string>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Safari iOS<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>4.3.3<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>iPod touch<\/string>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Mozilla\/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit\/533.17.9 (KHTML, like Gecko) Version\/5.0.2 Mobile\/8J2 Safari\/6533.18.5<\/string>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Safari iOS<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>4.3.3<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>iPad<\/string>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Mozilla\/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; en-us) AppleWebKit\/533.17.9 (KHTML, like Gecko) Version\/5.0.2 Mobile\/8J2 Safari\/6533.18.5<\/string>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>separator<\/key>\r\n\t\t\t<true\/>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Internet Explorer<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>9.0<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>Windows<\/string>\r\n\t\t\t<key>show-platform<\/key>\r\n\t\t\t<false\/>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Mozilla\/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident\/5.0;<\/string>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Internet Explorer<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>8.0<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>Windows<\/string>\r\n\t\t\t<key>show-platform<\/key>\r\n\t\t\t<false\/>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Mozilla\/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident\/4.0)<\/string>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Internet Explorer<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>7.0<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>Windows<\/string>\r\n\t\t\t<key>show-platform<\/key>\r\n\t\t\t<false\/>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Mozilla\/4.0 (compatible; MSIE 7.0; Windows NT 6.0)<\/string>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>separator<\/key>\r\n\t\t\t<true\/>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Firefox<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>4.0.1<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>Mac<\/string>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko\/20100101 Firefox\/4.0.1<\/string>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Firefox<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>4.0.1<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>Windows<\/string>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Mozilla\/5.0 (Windows NT 6.1; rv:2.0.1) Gecko\/20100101 Firefox\/4.0.1<\/string>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>separator<\/key>\r\n\t\t\t<true\/>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Opera<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>11.11<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>Mac<\/string>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Opera\/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto\/2.8.131 Version\/11.11<\/string>\r\n\t\t<\/dict>\r\n\t\t<dict>\r\n\t\t\t<key>name<\/key>\r\n\t\t\t<string>Opera<\/string>\r\n\t\t\t<key>version<\/key>\r\n\t\t\t<string>11.11<\/string>\r\n\t\t\t<key>platform<\/key>\r\n\t\t\t<string>Windows<\/string>\r\n\t\t\t<key>user-agent<\/key>\r\n\t\t\t<string>Opera\/9.80 (Windows NT 6.1; U; en) Presto\/2.8.131 Version\/11.11<\/string>\r\n\t\t<\/dict>\r\n\t<\/array>\r\n\t<\/plist>\r\n\t<\/pre>\n<h4>Comment tester ensuite ?<\/h4>\n<p>Il ne reste plus qu&#8217;\u00e0 faire la d\u00e9tection dans le langage de programmation de votre choix, en <code>PHP<\/code> ou en <code>Javascript<\/code> par exemple, puis de tester facilement si la d\u00e9tection fonctionne \u00e0 l&#8217;aide des nouveaux profils disponibles dans Safari afin d&#8217;afficher des experiences UX ou des IHM diff\u00e9rentes selon le terminal qui se pr\u00e9sente.<\/p>\n<p>Pour information, il existe de nombreuses fonctions de d\u00e9tection natives dans les CMS type WordPress ou disponibles sur le web.<\/p>\n<p>\t<b>Dans <code>WordPress<\/code>, il existe une fonction qui permet de diff\u00e9rencier le mobile du reste, sommaire mais efficace&#8230;<\/b><\/p>\n<pre lang=\"php\">\r\n\t<?php\r\n\t\/* http:\/\/codex.wordpress.org\/Function_Reference\/wp_is_mobile Since: 3.4 in WP *\/\r\n\tif ( wp_is_mobile() ) { \r\n\t\t\/\/ Visitor is on a mobile device\r\n\t\t\techo ('<!-- mobile device -->');\r\n\t\t} else { \r\n\t\t\/\/ Visitor is on a desktop (not mobile) device\r\n\t\t\techo ('<!-- desktop device -->');\r\n\t\t}\r\n\t?>\r\n\t<\/pre>\n<p>\t<i>Source : <a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/wp_is_mobile\" target=\"_blank\">http:\/\/codex.wordpress.org\/Function_Reference\/wp_is_mobile<\/a><\/i><\/p>\n<p>En voici une autre qui permet entre autre de distinguer : <code>mobile<\/code>, <code>tablet<\/code>, <code>desktop<\/code>.<\/p>\n<pre lang=\"php\">\r\n\t\r\n\t<?php \r\n\tfunction userAgent($ua){ \r\n\t## This credit must stay intact (Unless you have a deal with @lukasmig or frimerlukas@gmail.com \r\n\t## Made by Lukas Frimer Tholander from Made In Osted Webdesign. \r\n\t## Price will be $2 \r\n\r\n\t    $iphone = strstr(strtolower($ua), 'mobile'); \/\/Search for 'mobile' in user-agent (iPhone have that) \r\n\t    $android = strstr(strtolower($ua), 'android'); \/\/Search for 'android' in user-agent \r\n\t    $windowsPhone = strstr(strtolower($ua), 'phone'); \/\/Search for 'phone' in user-agent (Windows Phone uses that) \r\n\r\n\r\n\t    function androidTablet($ua){ \/\/Find out if it is a tablet \r\n\t        if(strstr(strtolower($ua), 'android') ){\/\/Search for android in user-agent \r\n\t            if(!strstr(strtolower($ua), 'mobile')){ \/\/If there is no ''mobile' in user-agent (Android have that on their phones, but not tablets) \r\n\t                return true; \r\n\t            } \r\n\t        } \r\n\t    } \r\n\t    $androidTablet = androidTablet($ua); \/\/Do androidTablet function \r\n\t    $ipad = strstr(strtolower($ua), 'ipad'); \/\/Search for iPad in user-agent \r\n\r\n\t    if($androidTablet || $ipad){ \/\/If it's a tablet (iPad \/ Android) \r\n\t        return 'tablet'; \r\n\t    } \r\n\t    elseif($iphone &amp;&amp; !$ipad || $android &amp;&amp; !$androidTablet || $windowsPhone){ \/\/If it's a phone and NOT a tablet \r\n\t        return 'mobile'; \r\n\t    } \r\n\t    else{ \/\/If it's not a mobile device \r\n\t        return 'desktop'; \r\n\t    }     \r\n\t} \r\n\t?>\r\n<\/pre>\n<p>Il existe aussi des &#8220;librairies&#8221; pour faire ce type de d\u00e9tection. On peut citer par exemple, celle de mobiledetect.net.<\/p>\n<blockquote><p>\n\tMobile Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.\n<\/p><\/blockquote>\n<p><i>Source : <a href=\"http:\/\/mobiledetect.net\/\" target=\"_blank\">http:\/\/mobiledetect.net\/<\/a><\/i><\/p>\n<p><b>Conclusion : Avec ces nouveaux &#8220;User Agent&#8221; disponibles dans Safari, vous pourrez nettement plus facilement tester les diff\u00e9rents terminaux sur lesquelles votre site sera susceptible d&#8217;\u00eatre vu et bien vu avec l&#8217;UX optimal !<\/b>\t<\/p>\n<h2>En savoir plus<\/h2>\n<ul>\n<li>Adding another User Agent to the Safari User Agent switcher menu<br \/><a href=\"http:\/\/steveswinsburg.wordpress.com\/2011\/08\/26\/adding-another-user-agent-to-the-safari-user-agent-switcher-menu\/\" target=\"_blank\">http:\/\/steveswinsburg.wordpress.com\/2011\/08\/26\/adding-another-user-agent-to-the-safari-user-agent-switcher-menu\/<\/a><\/li>\n<li>PHP Mobile Device Detection (iOS, Android, BlackBerry, PlayBook, WebOS)<br \/><a href=\"http:\/\/www.schiffner.com\/programming-php-classes\/php-mobile-device-detection\/\" target=\"_blank\">http:\/\/www.schiffner.com\/programming-php-classes\/php-mobile-device-detection\/<\/a><\/li>\n<li>DeviceAtlas | Mobile Device Detection<br \/><a href=\"https:\/\/deviceatlas.com\/\" target=\"_blank\">https:\/\/deviceatlas.com\/<\/a><\/li>\n<li>user agent &#8211; mobile, tablet or not? (works with android, iphone, window phone and more)<br \/><a href=\"http:\/\/phpsnips.com\/534\/User-Agent---Mobile,-Tablet-or-not?-(Works-with-Android,-iPhone,-Window-Phone-and-more)#.Ud192j7AXpl\" target=\"_blank\">http:\/\/phpsnips.com\/534\/User-Agent&#8212;Mobile,-Tablet-or-not?-(Works-with-Android,-iPhone,-Window-Phone-and-more)#.Ud192j7AXpl<\/a><\/li>\n<li>WordPress Conditional Tag to Detect Mobile Device<br \/><a href=\"http:\/\/www.blogtechnics.com\/wordpress\/wordpress-conditional-tag-to-detect-mobile-device\" target=\"_blank\">http:\/\/www.blogtechnics.com\/wordpress\/wordpress-conditional-tag-to-detect-mobile-device<\/a><\/li>\n<li>Blackberry User Agent Strings<br \/><a href=\"http:\/\/jeffhee.wordpress.com\/\" target=\"_blank\">http:\/\/jeffhee.wordpress.com\/<\/a><\/li>\n<li>The BlackBerry 10 User Agent String Has Arrived!<br \/><a href=\"http:\/\/devblog.blackberry.com\/2012\/08\/blackberry-10-user-agent-string\/\" target=\"_blank\">http:\/\/devblog.blackberry.com\/2012\/08\/blackberry-10-user-agent-string\/<\/a><\/li>\n<li>WordPress, Iphone, Mobile \u2013 Afficher un wordPress sur iPhone, iPod et Android<br \/><a href=\"http:\/\/social.hecube.net\/2009\/10\/wordpress-iphone-mobile-afficher-un-wordpress-sur-iphone-ipod-et-android\/\" target=\"_blank\">http:\/\/social.hecube.net\/2009\/10\/wordpress-iphone-mobile-afficher-un-wordpress-sur-iphone-ipod-et-android\/<\/a><\/li>\n<li>Joomla, Mobile, Plugin \u2013 Cr\u00e9er une version mobile de votre site sous Joomla<br \/><a href=\"http:\/\/social.hecube.net\/2009\/09\/joomla-mobile-plugin-creer-une-version-mobile-de-votre-site-sous-joomla\/\" target=\"_blank\">http:\/\/social.hecube.net\/2009\/09\/joomla-mobile-plugin-creer-une-version-mobile-de-votre-site-sous-joomla\/<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Il est parfois assez compliqu\u00e9 avec la seule utilisation d&#8217;\u00e9mulateurs (android, iOS, Windows Phone&#8230;) de tester de mani\u00e8re correcte un site que l&#8217;on souhaite faire&hellip; <\/p>\n<p class=\"text-center\"><a href=\"https:\/\/flaven.fr\/2013\/07\/mobile-tablette-navigateur-ajouter-des-user-agents-sur-safari-pour-tester-le-responsive-design-de-votre-site\/\" class=\"more-link\">Continue reading &rarr; <span class=\"screen-reader-text\">Mobile, Tablette, Navigateur &#8211; Ajouter des User Agents sur Safari pour tester le responsive design de votre site<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":9363,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"bf_ai_meta_description":"Ajoutez des User Agents sur Safari pour tester le responsive design de votre site. Simulez des profils pour tablette et mobile sur iOS, Android, Windows Phone.","bf_ai_og_title":"Ajouter des User Agents sur Safari","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3442,3444,3445,3447,3448,3449,3450,3451,3435,3452],"tags":[258,372,615,226,31,616,617,20,497,618,34,619,2192,2182,99],"class_list":["post-3866","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mobile-devices","category-programming-databases","category-seo-web-marketing","category-technology-trends","category-tools-productivity","category-tutorials-how-to","category-ux-product-design","category-web-design-front-end","category-web-development","category-wordpress-cms","tag-blackberry","tag-chrome","tag-galaxy","tag-javascript","tag-mobile","tag-mozilla","tag-navigateur","tag-php","tag-responsive","tag-safari","tag-tablette","tag-user-agent","tag-ux-experience-utilisateur","tag-web","tag-windows"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3Vuhl-10m","jetpack_featured_media_url":"https:\/\/flaven.fr\/wp-content\/uploads\/2013\/07\/user_agent_detect_b_bf.jpg","_links":{"self":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/3866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/comments?post=3866"}],"version-history":[{"count":7,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/3866\/revisions"}],"predecessor-version":[{"id":9611,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/3866\/revisions\/9611"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media\/9363"}],"wp:attachment":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media?parent=3866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/categories?post=3866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/tags?post=3866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}