INSERT INTO `wp_dyxkdh_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES
(1778, 3, '2011-10-17 19:03:29', '2011-10-17 23:03:29', 'In my last post, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"]{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }[/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. \r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-15', '', '', '2011-10-17 19:03:29', '2011-10-17 23:03:29', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-15/', 0, 'revision', '', 0),
(1779, 3, '2011-10-17 19:04:02', '2011-10-17 23:04:02', 'In my last post, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }[/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. \r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-16', '', '', '2011-10-17 19:04:02', '2011-10-17 23:04:02', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-16/', 0, 'revision', '', 0),
(1780, 3, '2011-10-17 19:08:15', '2011-10-17 23:08:15', 'In my last post, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em> and it''s because I have a closure which will <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value.\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-17', '', '', '2011-10-17 19:08:15', '2011-10-17 23:08:15', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-17/', 0, 'revision', '', 0),
(1781, 3, '2011-10-17 19:11:18', '2011-10-17 23:11:18', 'In my last post, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to John David Dalton for helping me troubleshoot this.\r\n\r\n\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-18', '', '', '2011-10-17 19:11:18', '2011-10-17 23:11:18', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-18/', 0, 'revision', '', 0),
(1782, 3, '2011-10-17 19:14:07', '2011-10-17 23:14:07', 'In my last post, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to John David Dalton for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which we need to determine which overlay icon needs to display. Since we now have three different types of notifications, we need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-19', '', '', '2011-10-17 19:14:07', '2011-10-17 23:14:07', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-19/', 0, 'revision', '', 0),
(1787, 3, '2011-10-17 20:10:33', '2011-10-18 00:10:33', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which we need to determine which overlay icon needs to display. Since we now have three different types of notifications, we need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new windows appear with your newly pinned site. You’ll soon see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site - Rotating Overlay Icons&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;	\r\n    color: #EDEFF4;\r\n}\r\n\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;\r\n&lt;h1&gt;Pinned Sites&lt;/h1&gt;\r\n&lt;p&gt;Rotating Overlay Icons&lt;/p&gt;\r\n&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-24', '', '', '2011-10-17 20:10:33', '2011-10-18 00:10:33', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-24/', 0, 'revision', '', 0);
INSERT INTO `wp_dyxkdh_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES
(1783, 3, '2011-10-17 19:17:54', '2011-10-17 23:17:54', 'In my last post, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to John David Dalton for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which we need to determine which overlay icon needs to display. Since we now have three different types of notifications, we need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new windows appear with your newly pinned site. You’ll soon see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also download everything here. The really great part is that it isn’t a lot of code to implement this. In fact, to use the API only required 4 method calls. The bulk of the code was to simulate pulling in data. And the “>impact on user engagement is certainly worth adding in the capability.\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site Test&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    color: #EDEFF4;\r\n}\r\n \r\nh1 {\r\n    float: left;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;\r\n    margin-left: 10px;\r\n    position: relative;\r\n}\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;Pinned Site Test&lt;/h1&gt;\r\n\r\n&lt;div&gt;&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-20', '', '', '2011-10-17 19:17:54', '2011-10-17 23:17:54', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-20/', 0, 'revision', '', 0),
(1784, 3, '2011-10-17 19:29:03', '2011-10-17 23:29:03', 'In my last post, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which we need to determine which overlay icon needs to display. Since we now have three different types of notifications, we need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new windows appear with your newly pinned site. You’ll soon see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also download everything here. The really great part is that it isn’t a lot of code to implement this. In fact, to use the API only required 4 method calls. The bulk of the code was to simulate pulling in data. And the “>impact on user engagement is certainly worth adding in the capability.\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site Test&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    color: #EDEFF4;\r\n}\r\n \r\nh1 {\r\n    float: left;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;\r\n    margin-left: 10px;\r\n    position: relative;\r\n}\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;Pinned Site Test&lt;/h1&gt;\r\n\r\n&lt;div&gt;&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-21', '', '', '2011-10-17 19:29:03', '2011-10-17 23:29:03', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-21/', 0, 'revision', '', 0),
(1786, 3, '2011-10-17 20:06:27', '2011-10-18 00:06:27', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which we need to determine which overlay icon needs to display. Since we now have three different types of notifications, we need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new windows appear with your newly pinned site. You’ll soon see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site Test&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    color: #EDEFF4;\r\n}\r\n \r\nh1 {\r\n    float: left;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;\r\n    margin-left: 10px;\r\n    position: relative;\r\n}\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;Pinned Site Test&lt;/h1&gt;\r\n\r\n&lt;div&gt;&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-23', '', '', '2011-10-17 20:06:27', '2011-10-18 00:06:27', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-23/', 0, 'revision', '', 0);
INSERT INTO `wp_dyxkdh_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES
(1785, 3, '2011-10-17 19:32:57', '2011-10-17 23:32:57', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which we need to determine which overlay icon needs to display. Since we now have three different types of notifications, we need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new windows appear with your newly pinned site. You’ll soon see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also download everything here. The really great part is that it isn’t a lot of code to implement this. In fact, to use the API only required 4 method calls. The bulk of the code was to simulate pulling in data. And the “>impact on user engagement is certainly worth adding in the capability.\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site Test&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    color: #EDEFF4;\r\n}\r\n \r\nh1 {\r\n    float: left;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;\r\n    margin-left: 10px;\r\n    position: relative;\r\n}\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;Pinned Site Test&lt;/h1&gt;\r\n\r\n&lt;div&gt;&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-22', '', '', '2011-10-17 19:32:57', '2011-10-17 23:32:57', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-22/', 0, 'revision', '', 0),
(1788, 3, '2011-10-17 20:11:26', '2011-10-18 00:11:26', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which we need to determine which overlay icon needs to display. Since we now have three different types of notifications, we need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new windows appear with your newly pinned site. You’ll soon see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site - Rotating Overlay Icons&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;	\r\n    color: #EDEFF4;\r\n}\r\n\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;\r\n&lt;h1&gt;Pinned Sites&lt;/h1&gt;\r\n&lt;p&gt;Rotating Overlay Icons&lt;/p&gt;\r\n&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-25', '', '', '2011-10-17 20:11:26', '2011-10-18 00:11:26', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-25/', 0, 'revision', '', 0),
(1789, 3, '2011-10-17 20:13:52', '2011-10-18 00:13:52', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which we need to determine which overlay icon needs to display. Since we now have three different types of notifications, we need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new windows appear with your newly pinned site. You’ll soon see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site - Rotating Overlay Icons&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;	\r\n    color: #EDEFF4;\r\n}\r\n\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;\r\n&lt;h1&gt;Pinned Sites&lt;/h1&gt;\r\n&lt;p&gt;Rotating Overlay Icons&lt;/p&gt;\r\n&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-26', '', '', '2011-10-17 20:13:52', '2011-10-18 00:13:52', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-26/', 0, 'revision', '', 0);
INSERT INTO `wp_dyxkdh_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES
(1790, 3, '2011-10-17 20:16:01', '2011-10-18 00:16:01', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use IE9′s Site Pinning API to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which I need to determine which overlay icon needs to display. Since I now have three different types of notifications, I need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new windows appear with your newly pinned site. You’ll soon see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site - Rotating Overlay Icons&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;	\r\n    color: #EDEFF4;\r\n}\r\n\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;\r\n&lt;h1&gt;Pinned Sites&lt;/h1&gt;\r\n&lt;p&gt;Rotating Overlay Icons&lt;/p&gt;\r\n&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-27', '', '', '2011-10-17 20:16:01', '2011-10-18 00:16:01', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-27/', 0, 'revision', '', 0),
(1791, 3, '2011-10-17 20:16:33', '2011-10-18 00:16:33', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use <a href="http://msdn.microsoft.com/en-us/library/gg491731(v=VS.85).aspx">IE9′s Site Pinning API</a> to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into but what happens if you have a site that offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for websites to offer multiple types of notifications from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which I need to determine which overlay icon needs to display. Since I now have three different types of notifications, I need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new windows appear with your newly pinned site. You’ll soon see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site - Rotating Overlay Icons&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;	\r\n    color: #EDEFF4;\r\n}\r\n\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;\r\n&lt;h1&gt;Pinned Sites&lt;/h1&gt;\r\n&lt;p&gt;Rotating Overlay Icons&lt;/p&gt;\r\n&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-28', '', '', '2011-10-17 20:16:33', '2011-10-18 00:16:33', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-28/', 0, 'revision', '', 0),
(1792, 3, '2011-10-17 20:18:13', '2011-10-18 00:18:13', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use <a href="http://msdn.microsoft.com/en-us/library/gg491731(v=VS.85).aspx">IE9′s Site Pinning API</a> to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into. But what happens if your site offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for them to also serve up multiple types of notifications, from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at a short, incrementing interval through each loop. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. Now, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which I need to determine which overlay icon needs to display. Since I now have three different types of notifications, I need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new windows appear with your newly pinned site. You’ll soon see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site - Rotating Overlay Icons&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;	\r\n    color: #EDEFF4;\r\n}\r\n\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;\r\n&lt;h1&gt;Pinned Sites&lt;/h1&gt;\r\n&lt;p&gt;Rotating Overlay Icons&lt;/p&gt;\r\n&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-29', '', '', '2011-10-17 20:18:13', '2011-10-18 00:18:13', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-29/', 0, 'revision', '', 0);
INSERT INTO `wp_dyxkdh_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES
(1793, 3, '2011-10-17 20:24:15', '2011-10-18 00:24:15', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use <a href="http://msdn.microsoft.com/en-us/library/gg491731(v=VS.85).aspx">IE9′s Site Pinning API</a> to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into. But what happens if your site offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for them to also serve up multiple types of notifications, from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at 1 second intervals. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. The expected functionality is that the "messages" icon will render followed by the "requests" icon 1 second later, and then finally the "actions" icon.\r\n\r\nNow, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which I need to determine which overlay icon needs to display. Since I now have three different types of notifications, I need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new window appear with your newly pinned site. Next, you’ll see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site - Rotating Overlay Icons&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;	\r\n    color: #EDEFF4;\r\n}\r\n\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;\r\n&lt;h1&gt;Pinned Sites&lt;/h1&gt;\r\n&lt;p&gt;Rotating Overlay Icons&lt;/p&gt;\r\n&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-30', '', '', '2011-10-17 20:24:15', '2011-10-18 00:24:15', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-30/', 0, 'revision', '', 0),
(1794, 3, '2011-10-17 20:26:30', '2011-10-18 00:26:30', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use <a href="http://msdn.microsoft.com/en-us/library/gg491731(v=VS.85).aspx">IE9′s Site Pinning API</a> to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into. But what happens if your site offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for them to also serve up multiple types of notifications, from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1000 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at 1 second intervals. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. The expected functionality is that the "messages" icon will render followed by the "requests" icon 1 second later, and then finally the "actions" icon.\r\n\r\nNow, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which I need to determine which overlay icon needs to display. Since I now have three different types of notifications, I need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new window appear with your newly pinned site. Next, you’ll see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site - Rotating Overlay Icons&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;	\r\n    color: #EDEFF4;\r\n}\r\n\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;\r\n&lt;h1&gt;Pinned Sites&lt;/h1&gt;\r\n&lt;p&gt;Rotating Overlay Icons&lt;/p&gt;\r\n&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-31', '', '', '2011-10-17 20:26:30', '2011-10-18 00:26:30', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-31/', 0, 'revision', '', 0),
(1795, 3, '2011-10-17 20:27:26', '2011-10-18 00:27:26', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use <a href="http://msdn.microsoft.com/en-us/library/gg491731(v=VS.85).aspx">IE9′s Site Pinning API</a> to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into. But what happens if your site offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for them to also serve up multiple types of notifications, from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1000 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at ~1 second intervals. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. The expected functionality is that the "messages" icon will render followed by the "requests" icon 1 second later, and then finally the "actions" icon.\r\n\r\nNow, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which I need to determine which overlay icon needs to display. Since I now have three different types of notifications, I need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new window appear with your newly pinned site. Next, you’ll see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site - Rotating Overlay Icons&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;	\r\n    color: #EDEFF4;\r\n}\r\n\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;\r\n&lt;h1&gt;Pinned Sites&lt;/h1&gt;\r\n&lt;p&gt;Rotating Overlay Icons&lt;/p&gt;\r\n&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-32', '', '', '2011-10-17 20:27:26', '2011-10-18 00:27:26', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-32/', 0, 'revision', '', 0);
INSERT INTO `wp_dyxkdh_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES
(1796, 3, '2011-10-17 20:30:17', '2011-10-18 00:30:17', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use <a href="http://msdn.microsoft.com/en-us/library/gg491731(v=VS.85).aspx">IE9′s Site Pinning API</a> to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into. But what happens if your site offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for them to also serve up multiple types of notifications, from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons using <a href="http://buildmypinnedsite.com/#step_1">the x-icon editor</a>. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1000 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at ~1 second intervals. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. The expected functionality is that the "messages" icon will render followed by the "requests" icon 1 second later, and then finally the "actions" icon.\r\n\r\nNow, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which I need to determine which overlay icon needs to display. Since I now have three different types of notifications, I need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new window appear with your newly pinned site. Next, you’ll see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site - Rotating Overlay Icons&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;	\r\n    color: #EDEFF4;\r\n}\r\n\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;\r\n&lt;h1&gt;Pinned Sites&lt;/h1&gt;\r\n&lt;p&gt;Rotating Overlay Icons&lt;/p&gt;\r\n&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-revision-33', '', '', '2011-10-17 20:30:17', '2011-10-18 00:30:17', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-revision-33/', 0, 'revision', '', 0),
(1797, 3, '2011-10-17 20:53:00', '2011-10-18 00:53:00', 'In my <a href="http://blog.reybango.com/2011/10/10/using-site-pinning-and-overlay-icons-for-enhanced-user-notifications-and-engagement/">last post</a>, I went over how to use <a href="http://msdn.microsoft.com/en-us/library/gg491731(v=VS.85).aspx">IE9′s Site Pinning API</a> to implement overlay icons to enhance user notifications. The demo focused on how to display a numeric icon to indicate when a specific event (e.g.: messages in an inbox) had occurred. \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay-icon.png" alt="" title="overlay-icon" width="508" height="150" class="alignleft size-full wp-image-1710" /></a>\r\n<em>Pinned site with overlay icon</em>\r\n\r\nIt''s a really great way of letting your users know that there''s pending information for them to check into. But what happens if your site offers multiple types of notifications? With websites offering so much functionality nowadays, it''s pretty common for them to also serve up multiple types of notifications, from friend requests and event reminders to new messages and game invites.\r\n\r\n<h2>Rotating Multiple Overlays Icons</h2>\r\n\r\nThe great thing about the Site Pinning API is that it''s very flexible and through some JavaScript magic, you can easily display multiple overlay icons for the various services you have. In this demo, I want to rotate through 3 different overlay icons that alert the user to pending messages, requests and actions.\r\n\r\nAs before, I had to flex some of my artistic talent by creating the overlay icons using <a href="http://buildmypinnedsite.com/#step_1">the x-icon editor</a>. I created 5 of each and here''s how the first three look:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/messages-1.png" alt="" title="messages-1" width="32" height="32" class="alignleft size-full wp-image-1762" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/requests-1.png" alt="" title="requests-1" width="32" height="32" class="alignleft size-full wp-image-1763" /></a><a href="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/actions-1.png" alt="" title="actions-1" width="32" height="32" class="alignleft size-full wp-image-1764" /></a>\r\n\r\nThe code changed slightly from the last demo in order to accommodate multiple bits of data per fetch. While previously, I was only fetching one piece of data, in this demo, I''m returning 3, one for each notification type:\r\n\r\n[code lang="js"] myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);[/code]\r\n\r\nAs a reminder, the method <em>getData()</em> <strong>simulates</strong> grabbing remote data. So if we look at the data above, we can simulate pulling back three distinct bits of data. This is why we call the method every 10 seconds using setInterval. This allows us to see how notifications might look over a period of time. \r\n\r\n[code lang="js"]setInterval(function () { myPin.getData() }, 10000);[/code]\r\n\r\nThe next thing that changed is the use of a timer to allow a slight delay while rendering the overlay icons. Using <em>setTimeout()</em> provides enough of delay so that an individual overlay icon is visible to the user before rotating on to the next icon. If we didn''t have this delay, the rotation would be way too fast to provide any useful notification. If we look at the following image, we can see what the notification will look like:\r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png"><img src="http://blog.reybango.com/wp-content/uploads/2011/10/overlay.png" alt="" title="overlay" width="332" height="150" class="alignleft size-full wp-image-1773" /></a>\r\n<em>Overlay icon showing numeric notification</em>\r\n\r\nThis is accomplished via the following code:\r\n\r\n[code lang="js"]// Grab the current set of data...\r\ncurrData = this.dataBin[this.currIndex++].data;		\r\n		\r\n/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n   let''s loop through the data elements for the current set of data... */\r\nfor (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n	(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1000 * idx); }( i ));					\r\n					\r\n}[/code]\r\n\r\nHere''s what''s happening. In the first line, I grab the current set of data that holds all of the notification information (messages, requests & actions). That data looks like this:\r\n\r\n[code lang="js"][{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, \r\n{ &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, \r\n{ &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }][/code]\r\n\r\nI loop through each group of data and assign a timer using <em>setTimeout()</em> that will call <em>dispOverlay()</em> at ~1 second intervals. That''s the magic code that allows for the gradual icon rendering delay I mentioned before. The expected functionality is that the "messages" icon will render followed by the "requests" icon 1 second later, and then finally the "actions" icon.\r\n\r\nNow, you might be wondering why I have an anonymous function wrapping the <em>setTimeout()</em>. It''s because I have a closure within setTimeout which can <a href="http://james.padolsey.com/javascript/closures-in-javascript/">cause a common scoping issue</a> in which the variable ''i'', which I use to grab the current index of data, will only be updated to the last index value. James Padolsey has a <a href="http://james.padolsey.com/javascript/closures-in-javascript/">great explanation on it</a> and thanks to <a href="https://twitter.com/jdalton">John David Dalton</a> for helping me troubleshoot this.\r\n\r\nThe final change is in <em>dispOverlay()</em> in which I need to determine which overlay icon needs to display. Since I now have three different types of notifications, I need a conditional statement to determine the type and build the correct icon name:\r\n\r\n[code lang="js"]if (theData.ntype == &quot;M&quot;) {\r\n	oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;R&quot;) {\r\n	oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n} else if (theData.ntype == &quot;A&quot;) {\r\n	oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n}[/code]\r\n\r\nThis checks the type and serves up the right icon based on the type and the number of notifications pending for that type.\r\n\r\n<h2>The Demo and Final Code</h2>\r\n\r\nYou can check out the demo by going here in IE9:\r\n\r\n<a href="http://reybango.com/demos/sprotate/index.html">http://reybango.com/demos/sprotate/index.html</a>\r\n\r\nWhen the page renders, drag the tab down to your taskbar and pin it. You should see a new window appear with your newly pinned site. Next, you’ll see the overlay icons appear in the taskbar and they should begin to cycle every 10 seconds.\r\n\r\nHere’s the full source code. You can also <a href="reybango.com/demos/sprotate/src/sprotate.zip">download everything here</a>. \r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Pinned Site - Rotating Overlay Icons&lt;/title&gt;\r\n&lt;link rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; href=&quot;favicon.ico&quot; /&gt;\r\n&lt;meta name=&quot;application-name&quot; content=&quot;Pinned Site Test&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-starturl&quot; content=&quot;http://reybango.com/demos/sprotate/index.html&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-navbutton-color&quot; content=&quot;#3480C0&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-window&quot; content=&quot;width=1024;height=768&quot; /&gt;\r\n&lt;meta name=&quot;msapplication-tooltip&quot; content=&quot;Testing the Pinned Site API&quot; /&gt;\r\n&lt;style&gt;\r\nbody {\r\n    background: none repeat scroll 0 0 #4492CE;\r\n    font: 440%/1.4em ''Segoe Light'',Segoe,''Segoe UI'',''Meiryo Regular'',''Meiryo'',sans-serif;	\r\n    color: #EDEFF4;\r\n}\r\n\r\n&lt;/style&gt;\r\n\r\n&lt;/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;\r\n&lt;h1&gt;Pinned Sites&lt;/h1&gt;\r\n&lt;p&gt;Rotating Overlay Icons&lt;/p&gt;\r\n&lt;/div&gt;\r\n\r\n&lt;script&gt;\r\n\r\n	var myData = [];\r\n\r\n    var myPin = {\r\n\r\n        currIndex: 0,\r\n        dataBin: [],\r\n		\r\n        getData: function () {\r\n\r\n			var idx = 0, currData = [], cntr = 0, theData;\r\n		\r\n            // Determines whether the current page was launched as a pinned site...\r\n            if (window.external.msIsSiteMode()) {\r\n\r\n				// Grab the current set of data...\r\n				currData = this.dataBin[this.currIndex++].data;		\r\n		\r\n				/* We''re going to display a new overlay every x number of seconds to display a new overlay icon so\r\n				   let''s loop through the data elements for the current set of data... */\r\n				for (var i=0; i &lt; currData.length; i++ ){\r\n					\r\n					(function(idx) { setTimeout( function(){ myPin.dispOverlay( currData[idx] ); }, 1e3 * idx); }( i ));					\r\n					\r\n				}\r\n				\r\n				if (this.currIndex &gt; 2) { this.currIndex = 0 }\r\n				\r\n            }\r\n\r\n        },\r\n\r\n        dispOverlay: function (theData) {\r\n\r\n            var oImg = &quot;&quot;;\r\n\r\n            // Is there any data?\r\n            if (theData) {\r\n\r\n                // Clear any preexisting overlay icon\r\n                window.external.msSiteModeClearIconOverlay();\r\n\r\n				// Render the overlay icon based on the data returned...\r\n				if (theData.ntype == &quot;M&quot;) {\r\n					oImg = &quot;images/messages-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;R&quot;) {\r\n					oImg = &quot;images/requests-&quot; + theData.num + &quot;.ico&quot;;\r\n				} else if (theData.ntype == &quot;A&quot;) {\r\n					oImg = &quot;images/actions-&quot; + theData.num + &quot;.ico&quot;;\r\n				}				\r\n\r\n                // Go ahead and create the overlay image and it''s label...\r\n                this.setOverlay(oImg, theData.label);\r\n\r\n            }\r\n\r\n        },\r\n\r\n        setOverlay: function (icon, desc) {\r\n\r\n            // Sets the overlay icons...\r\n            window.external.msSiteModeSetIconOverlay(icon, desc);\r\n            window.external.msSiteModeActivate();\r\n\r\n        },\r\n\r\n        init: function (myData) {\r\n\r\n            this.dataBin = myData;\r\n			this.getData();\r\n			\r\n        }\r\n\r\n    };\r\n\r\n    // This clears out any previously set overlay icons...\r\n    window.external.msSiteModeClearIconOverlay();\r\n	\r\n    // Run it once to kick everything off...\r\n    myPin.init([{ &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 2 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 3 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 2 }] },\r\n		        { &quot;data&quot; : [{ &quot;label&quot; : &quot;Messages&quot;, &quot;ntype&quot; : &quot;M&quot;, &quot;num&quot;: 5 }, { &quot;label&quot; : &quot;Requests&quot;, &quot;ntype&quot; : &quot;R&quot;, &quot;num&quot;: 1 }, { &quot;label&quot; : &quot;Actions&quot;, &quot;ntype&quot; : &quot;A&quot;, &quot;num&quot;: 4 }] }\r\n			   ]);\r\n\r\n    // This is only here because I want to simulate pulling data on a regular interval...\r\n    setInterval(function () { myPin.getData() }, 10000);\r\n\r\n&lt;/script&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;[/code]\r\n', 'Site Pinning: Rotating Overlay Icons for Multiple Service Notifications', 0, '', 'inherit', 'open', 'open', '', '1759-autosave', '', '', '2011-10-17 20:53:00', '2011-10-18 00:53:00', '', 1759, 'http://blog.reybango.com/2011/10/17/1759-autosave/', 0, 'revision', '', 0),
(1800, 3, '2012-01-09 16:39:18', '2012-01-09 20:39:18', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">explicitly declaring</a> the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">standards mode</a> in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in <a href="http://windows.microsoft.com/en-US/internet-explorer/ie-10-release-preview">Internet Explorer 10</a>.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the <em>Tools</em> menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a>\r\n<em>Click to Enlarge</em></li>\r\n<li>If your site is in <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 Standards</em>, <strong>you’re done!</strong>  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is <em>Browser Mode = IE8</em> and <em>Document Mode = Quirks</em> which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a>\r\n<em>Click to Enlarge</em></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n<li>My page is not in Document Mode = IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\r\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\r\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\r\n	\r\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\r\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\r\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\r\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\r\n\r\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\r\n\r\n<h2>Step 4: Resolve common IE problems when updating docmode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n<ul><li><strong>Possible Cause:</strong> <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">Conditional comments</a> support browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">conditional comments</a> that run non-standard code.  These are often used on specific features supported by older versions of IE to allow the page to degrade gracefully.  Check for code similar to this:\r\n[code lang="html"]&lt;!--[if IE 8]&gt;\r\n\r\n&lt;p&gt;Welcome to Internet Explorer 8.&lt;/p&gt;\r\n\r\n&lt;![endif]--&gt;\r\n[/code]\r\nRemove it and reload your page.  Continue testing. Learn more about Conditional Comments <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">here</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">User agent sniffing</a> supports browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">user agent sniffing</a>. These are often used to specifically target a browser based on the user agent string presented via the browser mode.  Check for code similar to this:\r\n[code lang="js"]if (version = /MSIE (\\d+\\.\\d+)/.exec(navigator.userAgent)) {\r\n\r\n	isIE = true;\r\n\r\nbrowserVersion = parseFloat(version[1]);\r\n}[/code]\r\nStart by implementing <a href="http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cross-browser-code.aspx">feature detection</a> where possible with web standards.  Learn more about User-Agent Strings <a href="http://msdn.microsoft.com/en-us/library/ms537503(v=VS.85).aspx">here</a>. The IE10 User-Agent String is located <a href="http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx">here</a>.</li></ul></li></ul>\r\n\r\n<h2>Other reasons my page does not render correctly:</h2>\r\n\r\n<ul><li><strong>Possible Cause:</strong> Your website may be using browser specific features that are no longer supported.  Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Run the <a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/Default.html">Compatibility Inspector tool</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be using 3rd party plug-ins or like Flash, Quicktime, and Silverlight that are no longer supported by the IE10 metro. Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Learn how to create plug-in free experiences.  A complete step-by-step guide will be available shortly.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be loading browser version-specific CSS files:\r\n<ul><li><strong>Resolution:</strong> Ensure layout is avoiding CSS hacks where possible.  Learn more about investigating CSS issues <a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">here</a>.</li></ul></li></ul>\r\n\r\nA list of common problems is available in the <a href="http://msdn.microsoft.com/en-us/library/ff986083(v=VS.85).aspx">IE Compatibility Cookbook</a>. \r\n\r\nIf you’re unable to update your docmode with these resolution steps, tweet us <a href="http://twitter.com/#!/IE">@IE</a> or check the <a href="http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads">Forums on MSDN</a>.\r\n\r\nFor further detail, try these articles:\r\n<ul><li><a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">Defining Document Capability</a> @ MSDN</li>\r\n<li><a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">Investigating Document Mode Issues</a> @ MSDN</li>\r\n<li><a href="http://blogs.msdn.com/b/ie/archive/2011/12/14/interoperable-html5-quirks-mode-in-ie10.aspx">Interoperable Quirks Mode in IE10</a> @ IE Blog</li>\r\n<li><a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/">Compatibility Inspector tool</a> @ IETestDrive.com</li>\r\n<li><a href="http://www.w3.org/QA/Tips/Doctype">Don’t Forget to Add a Doctype</a> @ W3C.org</li></ul>\r\n', 'Fix Common IE Problems: Update your Docmode for Web Standards', 0, '', 'publish', 'open', 'open', '', 'fix-common-ie-problems-update-your-docmode-for-web-standards', '', '', '2012-11-13 22:02:10', '2012-11-14 02:02:10', '', 0, 'http://blog.reybango.com/?p=1800', 0, 'post', '', 5),
(1801, 3, '2012-01-09 14:25:25', '2012-01-09 18:25:25', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\n\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\n\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\nStep 1: Validate that your site uses standards mode\nCheck whether or not your site is currently in standards mode:\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision', '', '', '2012-01-09 14:25:25', '2012-01-09 18:25:25', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision/', 0, 'revision', '', 0),
(1802, 3, '2012-01-09 14:25:29', '2012-01-09 18:25:29', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\nStep 1: Validate that your site uses standards mode\r\nCheck whether or not your site is currently in standards mode:\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-2', '', '', '2012-01-09 14:25:29', '2012-01-09 18:25:29', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-2/', 0, 'revision', '', 0),
(1803, 3, '2012-01-09 14:27:07', '2012-01-09 18:27:07', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-3', '', '', '2012-01-09 14:27:07', '2012-01-09 18:27:07', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-3/', 0, 'revision', '', 0),
(1804, 3, '2012-01-09 14:30:58', '2012-01-09 18:30:58', '', 'dev-tool-menu', 0, '', 'inherit', 'open', 'open', '', 'dev-tool-menu', '', '', '2012-01-09 14:30:58', '2012-01-09 18:30:58', '', 1800, 'http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu.png', 0, 'attachment', 'image/png', 0),
(1805, 3, '2012-01-09 14:29:42', '2012-01-09 18:29:42', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul>', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-4', '', '', '2012-01-09 14:29:42', '2012-01-09 18:29:42', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-4/', 0, 'revision', '', 0),
(1806, 3, '2012-01-09 14:33:55', '2012-01-09 18:33:55', '', 'dev-tool-menu-1', 0, '', 'inherit', 'open', 'open', '', 'dev-tool-menu-1', '', '', '2012-01-09 14:33:55', '2012-01-09 18:33:55', '', 1800, 'http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png', 0, 'attachment', 'image/png', 0),
(1807, 3, '2012-01-09 14:31:25', '2012-01-09 18:31:25', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-300x187.png" alt="" title="dev-tool-menu" width="300" height="187" class="alignleft size-medium wp-image-1804" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul>', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-5', '', '', '2012-01-09 14:31:25', '2012-01-09 18:31:25', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-5/', 0, 'revision', '', 0),
(1808, 3, '2012-01-09 14:35:32', '2012-01-09 18:35:32', '', 'ie-dev-tools-1', 0, '', 'inherit', 'open', 'open', '', 'ie-dev-tools-1-2', '', '', '2012-01-09 14:35:32', '2012-01-09 18:35:32', '', 1800, 'http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png', 0, 'attachment', 'image/png', 0),
(1809, 3, '2012-01-09 14:36:32', '2012-01-09 18:36:32', '', 'ie-dev-tools-2', 0, '', 'inherit', 'open', 'open', '', 'ie-dev-tools-2-2', '', '', '2012-01-09 14:36:32', '2012-01-09 18:36:32', '', 1800, 'http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png', 0, 'attachment', 'image/png', 0),
(1810, 3, '2012-01-09 14:34:04', '2012-01-09 18:34:04', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul>', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-6', '', '', '2012-01-09 14:34:04', '2012-01-09 18:34:04', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-6/', 0, 'revision', '', 0);
INSERT INTO `wp_dyxkdh_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES
(1811, 3, '2012-01-09 14:36:49', '2012-01-09 18:36:49', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a>', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-7', '', '', '2012-01-09 14:36:49', '2012-01-09 18:36:49', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-7/', 0, 'revision', '', 0),
(1812, 3, '2012-01-09 14:39:31', '2012-01-09 18:39:31', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert <!DOCTYPE html> into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>2.	Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li>\r\n\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-8', '', '', '2012-01-09 14:39:31', '2012-01-09 18:39:31', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-8/', 0, 'revision', '', 0),
(1813, 3, '2012-01-09 14:39:53', '2012-01-09 18:39:53', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>2.	Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li>\r\n\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-9', '', '', '2012-01-09 14:39:53', '2012-01-09 18:39:53', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-9/', 0, 'revision', '', 0),
(1814, 3, '2012-01-09 14:40:21', '2012-01-09 18:40:21', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert <pre><!DOCTYPE html></pre> into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>2.	Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li>\r\n\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-10', '', '', '2012-01-09 14:40:21', '2012-01-09 18:40:21', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-10/', 0, 'revision', '', 0),
(1815, 3, '2012-01-09 14:40:37', '2012-01-09 18:40:37', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>2.	Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li>\r\n\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-11', '', '', '2012-01-09 14:40:37', '2012-01-09 18:40:37', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-11/', 0, 'revision', '', 0),
(1816, 3, '2012-01-09 14:43:58', '2012-01-09 18:43:58', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in Compatibility View and forced into an older browser mode to ensure the site functions<ul><li>Resolution: Check if your site is on the list here.  Learn more about the Compatibility View list and request removal here.</li></ul></li></ul></li>\r\n\r\n\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-12', '', '', '2012-01-09 14:43:58', '2012-01-09 18:43:58', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-12/', 0, 'revision', '', 0),
(1817, 3, '2012-01-09 14:44:38', '2012-01-09 18:44:38', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li>Resolution: Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n\r\n\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-13', '', '', '2012-01-09 14:44:38', '2012-01-09 18:44:38', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-13/', 0, 'revision', '', 0),
(1818, 3, '2012-01-09 14:47:13', '2012-01-09 18:47:13', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n<li>My page is not in Document Mode = IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\r\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;   &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;         &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\r\nLearn more about how to update your doctypes here.</li></ul></li>\r\n	\r\n\r\n\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-14', '', '', '2012-01-09 14:47:13', '2012-01-09 18:47:13', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-14/', 0, 'revision', '', 0),
(1819, 3, '2012-01-09 14:49:11', '2012-01-09 18:49:11', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n<li>My page is not in Document Mode = IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\r\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;   &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;         &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\r\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\r\n	\r\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\r\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\r\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\r\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\r\n\r\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li>\r\n\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-15', '', '', '2012-01-09 14:49:11', '2012-01-09 18:49:11', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-15/', 0, 'revision', '', 0),
(1820, 3, '2012-01-09 14:49:54', '2012-01-09 18:49:54', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n<li>My page is not in Document Mode = IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\r\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;   &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;         &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\r\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\r\n	\r\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\r\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\r\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\r\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\r\n\r\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\r\n\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-16', '', '', '2012-01-09 14:49:54', '2012-01-09 18:49:54', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-16/', 0, 'revision', '', 0),
(1821, 3, '2012-01-09 14:54:52', '2012-01-09 18:54:52', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\n\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\n\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\n\n<h2>Step 1: Validate that your site uses standards mode</h2>\nCheck whether or not your site is currently in standards mode:\n<ol>\n<li>Open the website in IE10 platform preview.\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\n\n<h2>Step 2: Implement docmode for web standards</h2>\nForce IE10 standards mode to test your website:\n\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\n\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\n\n<ol><li>My page is not in Browser Mode: IE10\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\n<li>My page is not in Document Mode = IE10\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\n[code lang="html"]&lt;!DOCTYPE html&gt;\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;   &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;         &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\n	\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\n\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\n\n<h2>Step 4: Resolve common IE problems when updating docmode</h2>\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\n<ul><li><strong>Possible Cause:</strong> <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">Conditional comments</a> support browser version-specific features \n<ul><li><strong>Resolution:</strong> Check for <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">conditional comments</a> that run non-standard code.  These are often used on specific features supported by older versions of IE to allow the page to degrade gracefully.  Check for code similar to this:\n[code lang="html"]&lt;!--[if IE 8]&gt;\n&lt;p&gt;Welcome to Internet Explorer 8.&lt;/p&gt;\n&lt;![endif]--&gt;\n[/code]\nRemove it and reload your page.  Continue testing. Learn more about Conditional Comments <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">here</a>.</li></ul></li>\n<li><strong>Possible Cause:</strong> <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">User agent sniffing</a> supports browser version-specific features \n<ul><li><strong>Resolution:</strong> Check for user agent sniffing. These are often used to specifically target a browser based on the user agent string presented via the browser mode.  Check for code similar to this:', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-17', '', '', '2012-01-09 14:54:52', '2012-01-09 18:54:52', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-17/', 0, 'revision', '', 0);
INSERT INTO `wp_dyxkdh_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES
(1822, 3, '2012-01-09 14:55:52', '2012-01-09 18:55:52', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\n\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\n\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\n\n<h2>Step 1: Validate that your site uses standards mode</h2>\nCheck whether or not your site is currently in standards mode:\n<ol>\n<li>Open the website in IE10 platform preview.\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\n\n<h2>Step 2: Implement docmode for web standards</h2>\nForce IE10 standards mode to test your website:\n\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\n\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\n\n<ol><li>My page is not in Browser Mode: IE10\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\n<li>My page is not in Document Mode = IE10\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\n[code lang="html"]&lt;!DOCTYPE html&gt;\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;   &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;         &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\n	\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\n\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\n\n<h2>Step 4: Resolve common IE problems when updating docmode</h2>\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\n<ul><li><strong>Possible Cause:</strong> <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">Conditional comments</a> support browser version-specific features \n<ul><li><strong>Resolution:</strong> Check for <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">conditional comments</a> that run non-standard code.  These are often used on specific features supported by older versions of IE to allow the page to degrade gracefully.  Check for code similar to this:\n[code lang="html"]&lt;!--[if IE 8]&gt;\n&lt;p&gt;Welcome to Internet Explorer 8.&lt;/p&gt;\n&lt;![endif]--&gt;\n[/code]\nRemove it and reload your page.  Continue testing. Learn more about Conditional Comments <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">here</a>.</li></ul></li>\n<li><strong>Possible Cause:</strong> <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">User agent sniffing</a> supports browser version-specific features \n<ul><li><strong>Resolution:</strong> Check for <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">user agent sniffing</a>. These are often used to specifically target a browser based on the user agent string presented via the browser mode.  Check for code similar to this:\n[code lang="js"]if (version = /MSIE (\\d+\\.\\d+)/.exec(navigator.userAgent)) {\n	isIE = true;\nbrowserVersion = parseFloat(version[1]);\n}[/code]\nStart by implementing feature detection where possible with web standards.  Learn more about User-Agent Strings here. The IE10 User-Agent String is located here.', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-18', '', '', '2012-01-09 14:55:52', '2012-01-09 18:55:52', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-18/', 0, 'revision', '', 0),
(1823, 3, '2012-01-09 15:00:32', '2012-01-09 19:00:32', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n<li>My page is not in Document Mode = IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\r\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;   &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;         &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\r\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\r\n	\r\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\r\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\r\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\r\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\r\n\r\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\r\n\r\n<h2>Step 4: Resolve common IE problems when updating docmode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n<ul><li><strong>Possible Cause:</strong> <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">Conditional comments</a> support browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">conditional comments</a> that run non-standard code.  These are often used on specific features supported by older versions of IE to allow the page to degrade gracefully.  Check for code similar to this:\r\n[code lang="html"]&lt;!--[if IE 8]&gt;\r\n&lt;p&gt;Welcome to Internet Explorer 8.&lt;/p&gt;\r\n&lt;![endif]--&gt;\r\n[/code]\r\nRemove it and reload your page.  Continue testing. Learn more about Conditional Comments <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">here</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">User agent sniffing</a> supports browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">user agent sniffing</a>. These are often used to specifically target a browser based on the user agent string presented via the browser mode.  Check for code similar to this:\r\n[code lang="js"]if (version = /MSIE (\\d+\\.\\d+)/.exec(navigator.userAgent)) {\r\n	isIE = true;\r\nbrowserVersion = parseFloat(version[1]);\r\n}[/code]\r\nStart by implementing <a href="http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cross-browser-code.aspx">feature detection</a> where possible with web standards.  Learn more about User-Agent Strings <a href="http://msdn.microsoft.com/en-us/library/ms537503(v=VS.85).aspx">here</a>. The IE10 User-Agent String is located <a href="http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx">here</a>.</li></ul></li></ul>\r\n\r\n<h2>Other reasons my page does not render correctly:</h2>\r\n\r\n<ul><li><strong>Possible Cause:</strong> Your website may be using browser specific features that are no longer supported.  Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Run the <a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/Default.html">Compatibility Inspector tool</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be using 3rd party plug-ins or like Flash, Quicktime, and Silverlight that are no longer supported by the IE10 metro. Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Learn how to create plug-in free experiences.  A complete step-by-step guide will be available shortly.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be loading browser version-specific CSS files:\r\n<ul><li><strong>Resolution:</strong> Ensure layout is avoiding CSS hacks where possible.  Learn more about investigating CSS issues <a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">here</a>.</li></ul></li></ul>\r\n\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-19', '', '', '2012-01-09 15:00:32', '2012-01-09 19:00:32', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-19/', 0, 'revision', '', 0),
(1824, 3, '2012-01-09 15:03:57', '2012-01-09 19:03:57', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the Tools menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates Browser Mode: IE10 and Document Mode: IE10 standards as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in Browser Mode: IE10 and Document Mode: IE10 Standards, you’re done!  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is Browser Mode = IE8 and Document Mode = Quirks which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n<li>My page is not in Document Mode = IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\r\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;   &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;         &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\r\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\r\n	\r\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\r\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\r\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\r\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\r\n\r\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\r\n\r\n<h2>Step 4: Resolve common IE problems when updating docmode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n<ul><li><strong>Possible Cause:</strong> <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">Conditional comments</a> support browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">conditional comments</a> that run non-standard code.  These are often used on specific features supported by older versions of IE to allow the page to degrade gracefully.  Check for code similar to this:\r\n[code lang="html"]&lt;!--[if IE 8]&gt;\r\n&lt;p&gt;Welcome to Internet Explorer 8.&lt;/p&gt;\r\n&lt;![endif]--&gt;\r\n[/code]\r\nRemove it and reload your page.  Continue testing. Learn more about Conditional Comments <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">here</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">User agent sniffing</a> supports browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">user agent sniffing</a>. These are often used to specifically target a browser based on the user agent string presented via the browser mode.  Check for code similar to this:\r\n[code lang="js"]if (version = /MSIE (\\d+\\.\\d+)/.exec(navigator.userAgent)) {\r\n	isIE = true;\r\nbrowserVersion = parseFloat(version[1]);\r\n}[/code]\r\nStart by implementing <a href="http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cross-browser-code.aspx">feature detection</a> where possible with web standards.  Learn more about User-Agent Strings <a href="http://msdn.microsoft.com/en-us/library/ms537503(v=VS.85).aspx">here</a>. The IE10 User-Agent String is located <a href="http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx">here</a>.</li></ul></li></ul>\r\n\r\n<h2>Other reasons my page does not render correctly:</h2>\r\n\r\n<ul><li><strong>Possible Cause:</strong> Your website may be using browser specific features that are no longer supported.  Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Run the <a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/Default.html">Compatibility Inspector tool</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be using 3rd party plug-ins or like Flash, Quicktime, and Silverlight that are no longer supported by the IE10 metro. Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Learn how to create plug-in free experiences.  A complete step-by-step guide will be available shortly.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be loading browser version-specific CSS files:\r\n<ul><li><strong>Resolution:</strong> Ensure layout is avoiding CSS hacks where possible.  Learn more about investigating CSS issues <a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">here</a>.</li></ul></li></ul>\r\n\r\nA list of common problems is available in the <a href="http://msdn.microsoft.com/en-us/library/ff986083(v=VS.85).aspx">IE Compatibility Cookbook</a>. \r\n\r\nIf you’re unable to update your docmode with these resolution steps, tweet us <a href="http://twitter.com/#!/IE">@IE</a> or check the <a href="http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads">Forums on MSDN</a>.\r\n\r\nFor further detail, try these articles:\r\n<ul><li><a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">Defining Document Capability</a> @ MSDN</li>\r\n<li><a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">Investigating Document Mode Issues</a> @ MSDN</li>\r\n<li><a href="http://blogs.msdn.com/b/ie/archive/2011/12/14/interoperable-html5-quirks-mode-in-ie10.aspx">Interoperable Quirks Mode in IE10</a> @ IE Blog</li>\r\n<li><a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/">Compatibility Inspector tool</a> @ IETestDrive.com</li>\r\n<li><a href="http://www.w3.org/QA/Tips/Doctype">Don’t Forget to Add a Doctype</a> @ W3C.org</li></ul>\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-20', '', '', '2012-01-09 15:03:57', '2012-01-09 19:03:57', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-20/', 0, 'revision', '', 0),
(1827, 3, '2012-01-09 15:41:36', '2012-01-09 19:41:36', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\n\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\n\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\n\n<h2>Step 1: Validate that your site uses standards mode</h2>\nCheck whether or not your site is currently in standards mode:\n<ol>\n<li>Open the website in IE10 platform preview.\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \n<li>Press F12 to launch the IE Developer Tools or find it on the <em>Tools</em> menu as shown below: \n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \n<li>Check if your site indicates <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> as shown in the toolbar below:\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\n<li>If your site is in <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 Standards</em>, <strong>you’re done!</strong>  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is <em>Browser Mode = IE8</em> and <em>Document Mode = Quirks</em> which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\n\n<h2>Step 2: Implement docmode for web standards</h2>\nForce IE10 standards mode to test your website:\n\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\n\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\n\n<ol><li>My page is not in Browser Mode: IE10\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\n<li>My page is not in Document Mode = IE10\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\n[code lang="html"]&lt;!DOCTYPE html&gt;\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\n	\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\n\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\n\n<h2>Step 4: Resolve common IE problems when updating docmode</h2>\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\n<ul><li><strong>Possible Cause:</strong> <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">Conditional comments</a> support browser version-specific features \n<ul><li><strong>Resolution:</strong> Check for <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">conditional comments</a> that run non-standard code.  These are often used on specific features supported by older versions of IE to allow the page to degrade gracefully.  Check for code similar to this:\n[code lang="html"]&lt;!--[if IE 8]&gt;\n&lt;p&gt;Welcome to Internet Explorer 8.&lt;/p&gt;\n&lt;![endif]--&gt;\n[/code]\nRemove it and reload your page.  Continue testing. Learn more about Conditional Comments <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">here</a>.</li></ul></li>\n<li><strong>Possible Cause:</strong> <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">User agent sniffing</a> supports browser version-specific features \n<ul><li><strong>Resolution:</strong> Check for <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">user agent sniffing</a>. These are often used to specifically target a browser based on the user agent string presented via the browser mode.  Check for code similar to this:\n[code lang="js"]if (version = /MSIE (\\d+\\.\\d+)/.exec(navigator.userAgent)) {\n	isIE = true;\nbrowserVersion = parseFloat(version[1]);\n}[/code]\nStart by implementing <a href="http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cross-browser-code.aspx">feature detection</a> where possible with web standards.  Learn more about User-Agent Strings <a href="http://msdn.microsoft.com/en-us/library/ms537503(v=VS.85).aspx">here</a>. The IE10 User-Agent String is located <a href="http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx">here</a>.</li></ul></li></ul>\n\n<h2>Other reasons my page does not render correctly:</h2>\n\n<ul><li><strong>Possible Cause:</strong> Your website may be using browser specific features that are no longer supported.  Use web standards whenever possible.\n<ul><li><strong>Resolution:</strong> Run the <a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/Default.html">Compatibility Inspector tool</a>.</li></ul></li>\n<li><strong>Possible Cause:</strong> Your website may be using 3rd party plug-ins or like Flash, Quicktime, and Silverlight that are no longer supported by the IE10 metro. Use web standards whenever possible.\n<ul><li><strong>Resolution:</strong> Learn how to create plug-in free experiences.  A complete step-by-step guide will be available shortly.</li></ul></li>\n<li><strong>Possible Cause:</strong> Your website may be loading browser version-specific CSS files:\n<ul><li><strong>Resolution:</strong> Ensure layout is avoiding CSS hacks where possible.  Learn more about investigating CSS issues <a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">here</a>.</li></ul></li></ul>\n\nA list of common problems is available in the <a href="http://msdn.microsoft.com/en-us/library/ff986083(v=VS.85).aspx">IE Compatibility Cookbook</a>. \n\nIf you’re unable to update your docmode with these resolution steps, tweet us <a href="http://twitter.com/#!/IE">@IE</a> or check the <a href="http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads">Forums on MSDN</a>.\n\nFor further detail, try these articles:\n<ul><li><a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">Defining Document Capability</a> @ MSDN</li>\n<li><a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">Investigating Document Mode Issues</a> @ MSDN</li>\n<li><a href="http://blogs.msdn.com/b/ie/archive/2011/12/14/interoperable-html5-quirks-mode-in-ie10.aspx">Interoperable Quirks Mode in IE10</a> @ IE Blog</li>\n<li><a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/">Compatibility Inspector tool</a> @ IETestDrive.com</li>\n<li><a href="http://www.w3.org/QA/Tips/Doctype">Don’t Forget to Add a Doctype</a> @ W3C.org</li></ul>\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-23', '', '', '2012-01-09 15:41:36', '2012-01-09 19:41:36', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-23/', 0, 'revision', '', 0),
(1825, 3, '2012-01-09 15:06:47', '2012-01-09 19:06:47', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the <em>Tools</em> menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 Standards</em>, <strong>you’re done!</strong>  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is <em>Browser Mode = IE8</em> and <em>Document Mode = Quirks</em> which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n<li>My page is not in Document Mode = IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\r\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;   &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;         &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\r\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\r\n	\r\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\r\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\r\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\r\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\r\n\r\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\r\n\r\n<h2>Step 4: Resolve common IE problems when updating docmode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n<ul><li><strong>Possible Cause:</strong> <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">Conditional comments</a> support browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">conditional comments</a> that run non-standard code.  These are often used on specific features supported by older versions of IE to allow the page to degrade gracefully.  Check for code similar to this:\r\n[code lang="html"]&lt;!--[if IE 8]&gt;\r\n&lt;p&gt;Welcome to Internet Explorer 8.&lt;/p&gt;\r\n&lt;![endif]--&gt;\r\n[/code]\r\nRemove it and reload your page.  Continue testing. Learn more about Conditional Comments <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">here</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">User agent sniffing</a> supports browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">user agent sniffing</a>. These are often used to specifically target a browser based on the user agent string presented via the browser mode.  Check for code similar to this:\r\n[code lang="js"]if (version = /MSIE (\\d+\\.\\d+)/.exec(navigator.userAgent)) {\r\n	isIE = true;\r\nbrowserVersion = parseFloat(version[1]);\r\n}[/code]\r\nStart by implementing <a href="http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cross-browser-code.aspx">feature detection</a> where possible with web standards.  Learn more about User-Agent Strings <a href="http://msdn.microsoft.com/en-us/library/ms537503(v=VS.85).aspx">here</a>. The IE10 User-Agent String is located <a href="http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx">here</a>.</li></ul></li></ul>\r\n\r\n<h2>Other reasons my page does not render correctly:</h2>\r\n\r\n<ul><li><strong>Possible Cause:</strong> Your website may be using browser specific features that are no longer supported.  Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Run the <a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/Default.html">Compatibility Inspector tool</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be using 3rd party plug-ins or like Flash, Quicktime, and Silverlight that are no longer supported by the IE10 metro. Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Learn how to create plug-in free experiences.  A complete step-by-step guide will be available shortly.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be loading browser version-specific CSS files:\r\n<ul><li><strong>Resolution:</strong> Ensure layout is avoiding CSS hacks where possible.  Learn more about investigating CSS issues <a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">here</a>.</li></ul></li></ul>\r\n\r\nA list of common problems is available in the <a href="http://msdn.microsoft.com/en-us/library/ff986083(v=VS.85).aspx">IE Compatibility Cookbook</a>. \r\n\r\nIf you’re unable to update your docmode with these resolution steps, tweet us <a href="http://twitter.com/#!/IE">@IE</a> or check the <a href="http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads">Forums on MSDN</a>.\r\n\r\nFor further detail, try these articles:\r\n<ul><li><a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">Defining Document Capability</a> @ MSDN</li>\r\n<li><a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">Investigating Document Mode Issues</a> @ MSDN</li>\r\n<li><a href="http://blogs.msdn.com/b/ie/archive/2011/12/14/interoperable-html5-quirks-mode-in-ie10.aspx">Interoperable Quirks Mode in IE10</a> @ IE Blog</li>\r\n<li><a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/">Compatibility Inspector tool</a> @ IETestDrive.com</li>\r\n<li><a href="http://www.w3.org/QA/Tips/Doctype">Don’t Forget to Add a Doctype</a> @ W3C.org</li></ul>\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-21', '', '', '2012-01-09 15:06:47', '2012-01-09 19:06:47', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-21/', 0, 'revision', '', 0);
INSERT INTO `wp_dyxkdh_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES
(1826, 3, '2012-01-09 15:18:23', '2012-01-09 19:18:23', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the <em>Tools</em> menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 Standards</em>, <strong>you’re done!</strong>  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is <em>Browser Mode = IE8</em> and <em>Document Mode = Quirks</em> which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n<li>My page is not in Document Mode = IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\r\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;   &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;         &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\r\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\r\n	\r\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\r\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\r\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\r\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\r\n\r\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\r\n\r\n<h2>Step 4: Resolve common IE problems when updating docmode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n<ul><li><strong>Possible Cause:</strong> <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">Conditional comments</a> support browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">conditional comments</a> that run non-standard code.  These are often used on specific features supported by older versions of IE to allow the page to degrade gracefully.  Check for code similar to this:\r\n[code lang="html"]&lt;!--[if IE 8]&gt;\r\n&lt;p&gt;Welcome to Internet Explorer 8.&lt;/p&gt;\r\n&lt;![endif]--&gt;\r\n[/code]\r\nRemove it and reload your page.  Continue testing. Learn more about Conditional Comments <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">here</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">User agent sniffing</a> supports browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">user agent sniffing</a>. These are often used to specifically target a browser based on the user agent string presented via the browser mode.  Check for code similar to this:\r\n[code lang="js"]if (version = /MSIE (\\d+\\.\\d+)/.exec(navigator.userAgent)) {\r\n	isIE = true;\r\nbrowserVersion = parseFloat(version[1]);\r\n}[/code]\r\nStart by implementing <a href="http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cross-browser-code.aspx">feature detection</a> where possible with web standards.  Learn more about User-Agent Strings <a href="http://msdn.microsoft.com/en-us/library/ms537503(v=VS.85).aspx">here</a>. The IE10 User-Agent String is located <a href="http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx">here</a>.</li></ul></li></ul>\r\n\r\n<h2>Other reasons my page does not render correctly:</h2>\r\n\r\n<ul><li><strong>Possible Cause:</strong> Your website may be using browser specific features that are no longer supported.  Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Run the <a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/Default.html">Compatibility Inspector tool</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be using 3rd party plug-ins or like Flash, Quicktime, and Silverlight that are no longer supported by the IE10 metro. Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Learn how to create plug-in free experiences.  A complete step-by-step guide will be available shortly.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be loading browser version-specific CSS files:\r\n<ul><li><strong>Resolution:</strong> Ensure layout is avoiding CSS hacks where possible.  Learn more about investigating CSS issues <a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">here</a>.</li></ul></li></ul>\r\n\r\nA list of common problems is available in the <a href="http://msdn.microsoft.com/en-us/library/ff986083(v=VS.85).aspx">IE Compatibility Cookbook</a>. \r\n\r\nIf you’re unable to update your docmode with these resolution steps, tweet us <a href="http://twitter.com/#!/IE">@IE</a> or check the <a href="http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads">Forums on MSDN</a>.\r\n\r\nFor further detail, try these articles:\r\n<ul><li><a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">Defining Document Capability</a> @ MSDN</li>\r\n<li><a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">Investigating Document Mode Issues</a> @ MSDN</li>\r\n<li><a href="http://blogs.msdn.com/b/ie/archive/2011/12/14/interoperable-html5-quirks-mode-in-ie10.aspx">Interoperable Quirks Mode in IE10</a> @ IE Blog</li>\r\n<li><a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/">Compatibility Inspector tool</a> @ IETestDrive.com</li>\r\n<li><a href="http://www.w3.org/QA/Tips/Doctype">Don’t Forget to Add a Doctype</a> @ W3C.org</li></ul>\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-22', '', '', '2012-01-09 15:18:23', '2012-01-09 19:18:23', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-22/', 0, 'revision', '', 0),
(1828, 3, '2012-01-09 16:17:28', '2012-01-09 20:17:28', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the <em>Tools</em> menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="500" height="65" class="alignleft size-medium wp-image-1808" /></a>\r\n\r\n\r\n</li>\r\n<li>If your site is in <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 Standards</em>, <strong>you’re done!</strong>  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is <em>Browser Mode = IE8</em> and <em>Document Mode = Quirks</em> which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n<li>My page is not in Document Mode = IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\r\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\r\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\r\n	\r\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\r\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\r\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\r\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\r\n\r\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\r\n\r\n<h2>Step 4: Resolve common IE problems when updating docmode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n<ul><li><strong>Possible Cause:</strong> <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">Conditional comments</a> support browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">conditional comments</a> that run non-standard code.  These are often used on specific features supported by older versions of IE to allow the page to degrade gracefully.  Check for code similar to this:\r\n[code lang="html"]&lt;!--[if IE 8]&gt;\r\n&lt;p&gt;Welcome to Internet Explorer 8.&lt;/p&gt;\r\n&lt;![endif]--&gt;\r\n[/code]\r\nRemove it and reload your page.  Continue testing. Learn more about Conditional Comments <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">here</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">User agent sniffing</a> supports browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">user agent sniffing</a>. These are often used to specifically target a browser based on the user agent string presented via the browser mode.  Check for code similar to this:\r\n[code lang="js"]if (version = /MSIE (\\d+\\.\\d+)/.exec(navigator.userAgent)) {\r\n	isIE = true;\r\nbrowserVersion = parseFloat(version[1]);\r\n}[/code]\r\nStart by implementing <a href="http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cross-browser-code.aspx">feature detection</a> where possible with web standards.  Learn more about User-Agent Strings <a href="http://msdn.microsoft.com/en-us/library/ms537503(v=VS.85).aspx">here</a>. The IE10 User-Agent String is located <a href="http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx">here</a>.</li></ul></li></ul>\r\n\r\n<h2>Other reasons my page does not render correctly:</h2>\r\n\r\n<ul><li><strong>Possible Cause:</strong> Your website may be using browser specific features that are no longer supported.  Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Run the <a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/Default.html">Compatibility Inspector tool</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be using 3rd party plug-ins or like Flash, Quicktime, and Silverlight that are no longer supported by the IE10 metro. Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Learn how to create plug-in free experiences.  A complete step-by-step guide will be available shortly.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be loading browser version-specific CSS files:\r\n<ul><li><strong>Resolution:</strong> Ensure layout is avoiding CSS hacks where possible.  Learn more about investigating CSS issues <a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">here</a>.</li></ul></li></ul>\r\n\r\nA list of common problems is available in the <a href="http://msdn.microsoft.com/en-us/library/ff986083(v=VS.85).aspx">IE Compatibility Cookbook</a>. \r\n\r\nIf you’re unable to update your docmode with these resolution steps, tweet us <a href="http://twitter.com/#!/IE">@IE</a> or check the <a href="http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads">Forums on MSDN</a>.\r\n\r\nFor further detail, try these articles:\r\n<ul><li><a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">Defining Document Capability</a> @ MSDN</li>\r\n<li><a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">Investigating Document Mode Issues</a> @ MSDN</li>\r\n<li><a href="http://blogs.msdn.com/b/ie/archive/2011/12/14/interoperable-html5-quirks-mode-in-ie10.aspx">Interoperable Quirks Mode in IE10</a> @ IE Blog</li>\r\n<li><a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/">Compatibility Inspector tool</a> @ IETestDrive.com</li>\r\n<li><a href="http://www.w3.org/QA/Tips/Doctype">Don’t Forget to Add a Doctype</a> @ W3C.org</li></ul>\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-24', '', '', '2012-01-09 16:17:28', '2012-01-09 20:17:28', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-24/', 0, 'revision', '', 0),
(1829, 3, '2012-01-09 16:18:39', '2012-01-09 20:18:39', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the <em>Tools</em> menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 Standards</em>, <strong>you’re done!</strong>  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is <em>Browser Mode = IE8</em> and <em>Document Mode = Quirks</em> which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n<li>My page is not in Document Mode = IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\r\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\r\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\r\n	\r\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\r\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\r\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\r\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\r\n\r\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\r\n\r\n<h2>Step 4: Resolve common IE problems when updating docmode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n<ul><li><strong>Possible Cause:</strong> <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">Conditional comments</a> support browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">conditional comments</a> that run non-standard code.  These are often used on specific features supported by older versions of IE to allow the page to degrade gracefully.  Check for code similar to this:\r\n[code lang="html"]&lt;!--[if IE 8]&gt;\r\n&lt;p&gt;Welcome to Internet Explorer 8.&lt;/p&gt;\r\n&lt;![endif]--&gt;\r\n[/code]\r\nRemove it and reload your page.  Continue testing. Learn more about Conditional Comments <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">here</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">User agent sniffing</a> supports browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">user agent sniffing</a>. These are often used to specifically target a browser based on the user agent string presented via the browser mode.  Check for code similar to this:\r\n[code lang="js"]if (version = /MSIE (\\d+\\.\\d+)/.exec(navigator.userAgent)) {\r\n	isIE = true;\r\nbrowserVersion = parseFloat(version[1]);\r\n}[/code]\r\nStart by implementing <a href="http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cross-browser-code.aspx">feature detection</a> where possible with web standards.  Learn more about User-Agent Strings <a href="http://msdn.microsoft.com/en-us/library/ms537503(v=VS.85).aspx">here</a>. The IE10 User-Agent String is located <a href="http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx">here</a>.</li></ul></li></ul>\r\n\r\n<h2>Other reasons my page does not render correctly:</h2>\r\n\r\n<ul><li><strong>Possible Cause:</strong> Your website may be using browser specific features that are no longer supported.  Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Run the <a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/Default.html">Compatibility Inspector tool</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be using 3rd party plug-ins or like Flash, Quicktime, and Silverlight that are no longer supported by the IE10 metro. Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Learn how to create plug-in free experiences.  A complete step-by-step guide will be available shortly.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be loading browser version-specific CSS files:\r\n<ul><li><strong>Resolution:</strong> Ensure layout is avoiding CSS hacks where possible.  Learn more about investigating CSS issues <a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">here</a>.</li></ul></li></ul>\r\n\r\nA list of common problems is available in the <a href="http://msdn.microsoft.com/en-us/library/ff986083(v=VS.85).aspx">IE Compatibility Cookbook</a>. \r\n\r\nIf you’re unable to update your docmode with these resolution steps, tweet us <a href="http://twitter.com/#!/IE">@IE</a> or check the <a href="http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads">Forums on MSDN</a>.\r\n\r\nFor further detail, try these articles:\r\n<ul><li><a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">Defining Document Capability</a> @ MSDN</li>\r\n<li><a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">Investigating Document Mode Issues</a> @ MSDN</li>\r\n<li><a href="http://blogs.msdn.com/b/ie/archive/2011/12/14/interoperable-html5-quirks-mode-in-ie10.aspx">Interoperable Quirks Mode in IE10</a> @ IE Blog</li>\r\n<li><a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/">Compatibility Inspector tool</a> @ IETestDrive.com</li>\r\n<li><a href="http://www.w3.org/QA/Tips/Doctype">Don’t Forget to Add a Doctype</a> @ W3C.org</li></ul>\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-25', '', '', '2012-01-09 16:18:39', '2012-01-09 20:18:39', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-25/', 0, 'revision', '', 0),
(1831, 3, '2012-01-09 16:18:46', '2012-01-09 20:18:46', 'Document compatibility defines how a browser renders your website.  The more specific you are at telling the browser what to expect, the better the experience for your users. When using web standards like HTML5, start by explicitly declaring the HTML5 document type:\r\n\r\n[code lang="html"]&lt;!DOCTYPE html&gt;[/code]\r\n\r\nThis markup triggers standards mode in Internet Explorer 9 and 10.  And it also works well in Chrome and Firefox.  Four steps will get your site ready for many browsers and devices:\r\n\r\n<h2>Step 1: Validate that your site uses standards mode</h2>\r\nCheck whether or not your site is currently in standards mode:\r\n<ol>\r\n<li>Open the website in IE10 platform preview.\r\n<ul><li><strong>Note:</strong> You can also follow the same steps to update the docmode for IE9 only without downloading the preview.</li></ul></li> \r\n<li>Press F12 to launch the IE Developer Tools or find it on the <em>Tools</em> menu as shown below: \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/dev-tool-menu-1.png" alt="" title="dev-tool-menu-1" width="243" height="268" class="alignleft size-full wp-image-1806" /></a>\r\n<ul><li><strong>Note:</strong> If you’re not familiar with using the IE F12 Developer Tools to debug your webpages, please read the <a href="http://msdn.microsoft.com/en-us/library/gg589507%28v=VS.85%29.aspx">following tutorial</a>.</li></ul></li> \r\n<li>Check if your site indicates <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> as shown in the toolbar below:\r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-1-300x39.png" alt="" title="ie-dev-tools-1" width="300" height="39" class="alignleft size-medium wp-image-1808" /></a></li>\r\n<li>If your site is in <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 Standards</em>, <strong>you’re done!</strong>  Note if the Browser Mode and Document Mode of your site are different than above.  A common example is <em>Browser Mode = IE8</em> and <em>Document Mode = Quirks</em> which indicates that your website was designed for older versions of IE and may not be ready for web standards.  \r\n<a href="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2.png"><img src="http://blog.reybango.com/wp-content/uploads/2012/01/ie-dev-tools-2-300x42.png" alt="" title="ie-dev-tools-2" width="300" height="42" class="alignleft size-medium wp-image-1809" /></a></li></ol>\r\n\r\n<h2>Step 2: Implement docmode for web standards</h2>\r\nForce IE10 standards mode to test your website:\r\n\r\n<ol><li>Insert [code lang="html"]&lt;!DOCTYPE html&gt;[/code] into your website’s HTML page\r\n<ul><li>Learn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a></li></ul></li>\r\n<li>Reload your page in the browser and check the <em>Browser Mode</em> and <em>Document Mode</em> again using the F12 Developer Tools.  If <em>Browser Mode: IE10</em> and <em>Document Mode: IE10 standards</em> are not shown, continue below.</li></ol>\r\n\r\n<h2>Step 3: Determine why your site is not in Standards Mode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n\r\n<ol><li>My page is not in Browser Mode: IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website may flagged in <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx">Compatibility View</a> and forced into an older browser mode to ensure the site functions<ul><li><strong>Resolution:</strong> Check if your site is on the list <a href="http://ie9cvlist.ie.microsoft.com/ie9CompatViewList.xml">here</a>.  Learn more about the Compatibility View list and request removal <a href="http://msdn.microsoft.com/en-us/library/dd567845(v=VS.85).aspx#removal">here</a>.</li></ul></li></ul></li>\r\n<li>My page is not in Document Mode = IE10\r\n<ul><li><strong>Possible Cause:</strong> Your website’s doctype is invalid or missing\r\n<ul><li><strong>Resolution:</strong> Check for a <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">valid, well-formed doctype</a> like:\r\n[code lang="html"]&lt;!DOCTYPE html&gt;\r\n&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;[/code]\r\nLearn more about how to update your doctypes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">here</a>.</li></ul></li>\r\n	\r\n<ul><li><strong>Possible Cause:</strong> Docmode being forced via <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx">X-UA-Compatible meta tag</a>\r\n<ul><li><strong>Resolution:</strong> Check for code similar to this in the <head> of the page.\r\n[code lang="html"]&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE7&quot; &gt;\r\n&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=8&quot; &gt;[/code]\r\n\r\nRemove it and reload your page.  Continue testing.  Learn more about Specifying Document Compatibility Modes <a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx#SetMode">here</a>.</li></ul></li></li></ol>\r\n\r\n<h2>Step 4: Resolve common IE problems when updating docmode</h2>\r\nMost problems are related to supporting older versions of IE.  Start by ensuring your standards-based code is rendered in IE9 and 10.  Then keep your non-standards-based code for older versions of IE.\r\n<ul><li><strong>Possible Cause:</strong> <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">Conditional comments</a> support browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">conditional comments</a> that run non-standard code.  These are often used on specific features supported by older versions of IE to allow the page to degrade gracefully.  Check for code similar to this:\r\n[code lang="html"]&lt;!--[if IE 8]&gt;\r\n&lt;p&gt;Welcome to Internet Explorer 8.&lt;/p&gt;\r\n&lt;![endif]--&gt;\r\n[/code]\r\nRemove it and reload your page.  Continue testing. Learn more about Conditional Comments <a href="http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx">here</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">User agent sniffing</a> supports browser version-specific features \r\n<ul><li><strong>Resolution:</strong> Check for <a href="http://blogs.msdn.com/b/ieinternals/archive/2011/06/30/perils-of-user-agent-sniffing-browser-mode-document-mode-compatibility-view.aspx">user agent sniffing</a>. These are often used to specifically target a browser based on the user agent string presented via the browser mode.  Check for code similar to this:\r\n[code lang="js"]if (version = /MSIE (\\d+\\.\\d+)/.exec(navigator.userAgent)) {\r\n	isIE = true;\r\nbrowserVersion = parseFloat(version[1]);\r\n}[/code]\r\nStart by implementing <a href="http://blogs.msdn.com/b/ie/archive/2010/04/14/same-markup-writing-cross-browser-code.aspx">feature detection</a> where possible with web standards.  Learn more about User-Agent Strings <a href="http://msdn.microsoft.com/en-us/library/ms537503(v=VS.85).aspx">here</a>. The IE10 User-Agent String is located <a href="http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx">here</a>.</li></ul></li></ul>\r\n\r\n<h2>Other reasons my page does not render correctly:</h2>\r\n\r\n<ul><li><strong>Possible Cause:</strong> Your website may be using browser specific features that are no longer supported.  Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Run the <a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/Default.html">Compatibility Inspector tool</a>.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be using 3rd party plug-ins or like Flash, Quicktime, and Silverlight that are no longer supported by the IE10 metro. Use web standards whenever possible.\r\n<ul><li><strong>Resolution:</strong> Learn how to create plug-in free experiences.  A complete step-by-step guide will be available shortly.</li></ul></li>\r\n<li><strong>Possible Cause:</strong> Your website may be loading browser version-specific CSS files:\r\n<ul><li><strong>Resolution:</strong> Ensure layout is avoiding CSS hacks where possible.  Learn more about investigating CSS issues <a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">here</a>.</li></ul></li></ul>\r\n\r\nA list of common problems is available in the <a href="http://msdn.microsoft.com/en-us/library/ff986083(v=VS.85).aspx">IE Compatibility Cookbook</a>. \r\n\r\nIf you’re unable to update your docmode with these resolution steps, tweet us <a href="http://twitter.com/#!/IE">@IE</a> or check the <a href="http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads">Forums on MSDN</a>.\r\n\r\nFor further detail, try these articles:\r\n<ul><li><a href="http://msdn.microsoft.com/en-us/library/cc288325(v=VS.85).aspx">Defining Document Capability</a> @ MSDN</li>\r\n<li><a href="http://msdn.microsoft.com/en-us/library/gg699340(v=VS.85).aspx">Investigating Document Mode Issues</a> @ MSDN</li>\r\n<li><a href="http://blogs.msdn.com/b/ie/archive/2011/12/14/interoperable-html5-quirks-mode-in-ie10.aspx">Interoperable Quirks Mode in IE10</a> @ IE Blog</li>\r\n<li><a href="http://ie.microsoft.com/testdrive/HTML5/CompatInspector/">Compatibility Inspector tool</a> @ IETestDrive.com</li>\r\n<li><a href="http://www.w3.org/QA/Tips/Doctype">Don’t Forget to Add a Doctype</a> @ W3C.org</li></ul>\r\n', 'Fix common IE problems: Update your Docmode for Web Standards', 0, '', 'inherit', 'open', 'open', '', '1800-revision-26', '', '', '2012-01-09 16:18:46', '2012-01-09 20:18:46', '', 1800, 'http://blog.reybango.com/2012/01/09/1800-revision-26/', 0, 'revision', '', 0);
