<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>browser &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/browser/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>Browsers, pixels and graphic rendering!</title>
		<link>/2009/11/05/browsers-pixels-and-graphic-rendering/</link>
		<comments>/2009/11/05/browsers-pixels-and-graphic-rendering/#respond</comments>
		<pubDate>Thu, 05 Nov 2009 19:00:34 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[height]]></category>
		<category><![CDATA[pixels]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[scale]]></category>
		<category><![CDATA[width]]></category>

		<guid isPermaLink="false">/?p=807</guid>
		<description><![CDATA[These days I noticed something quite interesting in rendering DOM elements by a sample browser. In my case this was Firefox, but whatever the browser was this happens always. Let me explain you what was the case. I have to render 200 DIV elements, each with 2 pixels width and 30 pixels height. Thus you &#8230; <a href="/2009/11/05/browsers-pixels-and-graphic-rendering/" class="more-link">Continue reading <span class="screen-reader-text">Browsers, pixels and graphic rendering!</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/02/18/stylesheets-may-block-rendering-in-ie-the-solution-is-maybe-dynamic-loading/" rel="bookmark" title="Stylesheets may block rendering in IE. The solution is maybe dynamic loading.">Stylesheets may block rendering in IE. The solution is maybe dynamic loading. </a></li>
<li><a href="/2009/05/25/javascript-random-numbers/" rel="bookmark" title="JavaScript random numbers">JavaScript random numbers </a></li>
<li><a href="/2009/11/11/jquery-css-functions-part-2-width-and-height/" rel="bookmark" title="jQuery CSS functions. Part 2 &#8211; width() and height()">jQuery CSS functions. Part 2 &#8211; width() and height() </a></li>
<li><a href="/2010/03/10/change-the-viewport-be-ready-for-the-iphone/" rel="bookmark" title="Change the Viewport, be Ready for the iPhone!">Change the Viewport, be Ready for the iPhone! </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>These days I noticed something quite interesting in rendering DOM elements by a sample browser. In my case this was Firefox, but whatever the browser was this happens always.</p>
<p>Let me explain you what was the case. I have to render 200 DIV elements, each with 2 pixels width and 30 pixels height. Thus you got something like a scale.</p>
<p>So far so good. The problem is that if you get some random width for the scale as the browser can be resized. If you&#8217;d like something like random space (gap) between the scale bars you get something like 7,35 pixels between every two bars.</p>
<p>Of course the browser cannot use non integer pixels so it starts to render gaps which are 7 pixels wide and in every few pixels it renders 8 pixel single gap. Thus he corrects this problem.</p>
<p>My advice is &#8211; don&#8217;t make the browser think and round the pixels. Use fixed integers to make browser flow faster. You can fix the whole width to be multiple of 200 pixels which is the number of bars.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/02/18/stylesheets-may-block-rendering-in-ie-the-solution-is-maybe-dynamic-loading/" rel="bookmark" title="Stylesheets may block rendering in IE. The solution is maybe dynamic loading.">Stylesheets may block rendering in IE. The solution is maybe dynamic loading. </a></li>
<li><a href="/2009/05/25/javascript-random-numbers/" rel="bookmark" title="JavaScript random numbers">JavaScript random numbers </a></li>
<li><a href="/2009/11/11/jquery-css-functions-part-2-width-and-height/" rel="bookmark" title="jQuery CSS functions. Part 2 &#8211; width() and height()">jQuery CSS functions. Part 2 &#8211; width() and height() </a></li>
<li><a href="/2010/03/10/change-the-viewport-be-ready-for-the-iphone/" rel="bookmark" title="Change the Viewport, be Ready for the iPhone!">Change the Viewport, be Ready for the iPhone! </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/11/05/browsers-pixels-and-graphic-rendering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery browser and OS detection plugin</title>
		<link>/2009/07/16/jquery-browser-and-os-detection-plugin/</link>
		<comments>/2009/07/16/jquery-browser-and-os-detection-plugin/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 13:50:42 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[os]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[quirksmode]]></category>

		<guid isPermaLink="false">/?p=689</guid>
		<description><![CDATA[Browser/OS detection with jQuery As I wrote in my recent post I simply use the PPK BrowserDetect object to find out the browser/OS of the client. Actually I&#8217;m pretty sure there&#8217;s a similar jQuery plugin based again on that code from Quirksmode.org, but however I decided to write a simple plugin for jQuery wrapping it &#8230; <a href="/2009/07/16/jquery-browser-and-os-detection-plugin/" class="more-link">Continue reading <span class="screen-reader-text">jQuery browser and OS detection plugin</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/07/27/jquery-debug-plugin/" rel="bookmark" title="jQuery debug plugin">jQuery debug plugin </a></li>
<li><a href="/2010/02/01/writing-a-jquery-plugin-part-2-sample-plugin/" rel="bookmark" title="Writing a jQuery plugin &#8211; (part 2). Sample plugin.">Writing a jQuery plugin &#8211; (part 2). Sample plugin. </a></li>
<li><a href="/2010/02/16/jquery-tooltip-plugin/" rel="bookmark" title="jQuery tooltip plugin!">jQuery tooltip plugin! </a></li>
<li><a href="/2010/02/17/clickoutside-jquery-plugin/" rel="bookmark" title="clickoutside jQuery plugin">clickoutside jQuery plugin </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Browser/OS detection with jQuery</h2>
<p>As I wrote in my recent <a title="jQuery OS detection" href="/2009/07/04/jquery-os-detection/" target="_self">post</a> I simply use the <a title="PPK BrowserDetect object" href="http://www.quirksmode.org/js/detect.html" target="_blank">PPK BrowserDetect object</a> to find out the browser/OS of the client. Actually I&#8217;m pretty sure there&#8217;s a similar jQuery plugin based again on that code from <a title="Quirks Mode" href="http://www.quirksmode.org/" target="_blank">Quirksmode.org</a>, but however I decided to write a simple plugin for jQuery wrapping it into a closure and exporting it in the &#8220;$&#8221; object.</p>
<p><a href="/wp-content/uploads/2009/07/jquery-client-detect-source.png"><img class="alignnone size-full wp-image-692" title="jquery-client-detect-source" src="/wp-content/uploads/2009/07/jquery-client-detect-source.png" alt="" width="430" height="257" srcset="/wp-content/uploads/2009/07/jquery-client-detect-source.png 430w, /wp-content/uploads/2009/07/jquery-client-detect-source-300x179.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<h2>Demo</h2>
<p>You can see full working example <a title="jquery client detect" href="http://stoimen.com/jquery.client.plugin/" target="_blank">here</a>.</p>
<p><a href="/wp-content/uploads/2009/07/jquery-client-detect.png"><img class="alignnone size-full wp-image-690" title="jquery-client-detect" src="/wp-content/uploads/2009/07/jquery-client-detect.png" alt="" width="430" height="150" srcset="/wp-content/uploads/2009/07/jquery-client-detect.png 430w, /wp-content/uploads/2009/07/jquery-client-detect-300x104.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<h2>Installation</h2>
<p>You must add a link to <a title="jquery client detect js" href="http://stoimen.com/jquery.client.plugin/jquery.client.js.zip" target="_blank">jquery.client.js</a> after the jquery.js file in your code:</p>
<pre lang="html4strict" escaped="true">&lt;html&gt;
&lt;body&gt;
 &lt;div id="os"&gt;&lt;/div&gt;
 &lt;div id="browser"&gt;&lt;/div&gt;
 &lt;script src="./jquery-1.3.2.js"&gt;&lt;/script&gt;
 &lt;script src="./jquery.client.js"&gt;&lt;/script&gt;
 &lt;script&gt;
  $('#os').html("&lt;b&gt;" + $.client.os + "&lt;/b&gt;");
  $('#browser').html("&lt;b&gt;" + $.client.browser + "&lt;/b&gt;");
 &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Now there&#8217;s a $.client object containing two strings with OS and browser, they can be referenced with:</p>
<pre lang="javascript">$.client.browser
$.client.os</pre>
<p>You can append this code after you jquery.js installation. And if you&#8217;re on Firefox you simply can test with the <strong>console</strong> object:</p>
<p><a href="/wp-content/uploads/2009/07/jquery-client-detect-firebug-console.png"><img class="alignnone size-full wp-image-691" title="jquery-client-detect-firebug-console" src="/wp-content/uploads/2009/07/jquery-client-detect-firebug-console.png" alt="" width="430" height="114" srcset="/wp-content/uploads/2009/07/jquery-client-detect-firebug-console.png 430w, /wp-content/uploads/2009/07/jquery-client-detect-firebug-console-300x79.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<h2>Download</h2>
<p>You can download the sample code from <a title="jquery client plugin download" href="http://stoimen.com/jquery.client.plugin/jquery.client.js.zip">here</a>.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/07/27/jquery-debug-plugin/" rel="bookmark" title="jQuery debug plugin">jQuery debug plugin </a></li>
<li><a href="/2010/02/01/writing-a-jquery-plugin-part-2-sample-plugin/" rel="bookmark" title="Writing a jQuery plugin &#8211; (part 2). Sample plugin.">Writing a jQuery plugin &#8211; (part 2). Sample plugin. </a></li>
<li><a href="/2010/02/16/jquery-tooltip-plugin/" rel="bookmark" title="jQuery tooltip plugin!">jQuery tooltip plugin! </a></li>
<li><a href="/2010/02/17/clickoutside-jquery-plugin/" rel="bookmark" title="clickoutside jQuery plugin">clickoutside jQuery plugin </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/07/16/jquery-browser-and-os-detection-plugin/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
	</channel>
</rss>
