<?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>CSSKarma &#187; firefox</title> <atom:link href="http://www.csskarma.com/blog/tag/firefox/feed/" rel="self" type="application/rss+xml" /><link>http://www.csskarma.com/blog</link> <description>display your style</description> <lastBuildDate>Tue, 31 Jan 2012 15:18:44 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Keeping up with the times</title><link>http://www.csskarma.com/blog/keeping-up-with-the-times/</link> <comments>http://www.csskarma.com/blog/keeping-up-with-the-times/#comments</comments> <pubDate>Fri, 29 Aug 2008 16:02:26 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Life]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[rss]]></category> <category><![CDATA[time]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=70</guid> <description><![CDATA[Everytime you turn around there&#8217;s something new in the web to learn. Whether it be another JQuery plugin (YAJPI), a new blogging service (YABS), social networking site (YASNS) a new way to handle CSS Sprites or yet another acronym to learn (YAATL).  There&#8217;s so much to do and learn about, how do we keep up? [...]]]></description> <content:encoded><![CDATA[<p>Everytime you turn around there&#8217;s something new in the web to learn. Whether it be another <a
title="jquery.com" href="http://jquery.com">JQuery</a> plugin (YAJPI), a new blogging service (YABS), social networking site (YASNS) a new way to handle <a
title="A List Apart" href="http://www.alistapart.com/articles/sprites2">CSS Sprites</a> or yet another acronym to learn (YAATL).  There&#8217;s so much to do and learn about, how do we keep up?</p><p>I think most of us (the people who read this blog) keep up with the times by monitoring RSS feeds or reading books, I know that&#8217;s how I do it. But over the past few years my RSS reader has become more and more bloated. From time to time you may run through your feeds and delete the older ones, one&#8217;s that haven&#8217;t posted in a while or people who just complain about the government. But they&#8217;re all still valuable!</p><p>I try very hard to never delete an RSS feed. In fact, not too long ago I noticed that my feed menu had started to run off the page (I use Firefox to manage my RSS), so I got a bigger monitor to compensate; because you never really know where that bit of genius, that air of brilliance will come from. It could be from <a
title="Eric Meyer" href="http://www.meyerweb.com">Eric Meyer</a>, <a
title="Mezzoblue" href="http://www.mezzoblue.com">David Shea</a> or from your random <a
title="Swatkins" href="http://swatkins.info/">Swatkins blog</a>.</p><p>I first noticed that I was neglecting my feeds when I saw 2 cycles of <a
title="A List Apart" href="http://www.alistapart.com">A List Apart</a> and at least 10 <a
title="CSS Tricks" href="http://www.css-tricks.com">CSS-Tricks</a> posts/screencasts whiz past me, and that I hadn&#8217;t made a blog post in over a month (not cool with that at all). We&#8217;re all very busy at work, some more than others, but we still need to keep up with what&#8217;s happening in the industry.</p><p>Many times when I&#8217;m busy and I look at that long list of RSS feeds in front of me I just let out a :sigh: and say &#8220;I&#8217;ll just check a couple since I&#8217;m busy, and then maybe some more tomorrow when it calms down.&#8221; It had been happening a lot lately so I came to the conclusion that it&#8217;s not going to calm down, and that it&#8217;s time to get back into my old RSS groove. It&#8217;s really not that difficult to take some time out of every day for a little news reading. In fact, the ALA news days usually take the most time.</p><p>Many of us get to work, have our coffee, sit down, chat a little and before you know it, 20-30 minutes have gone by and you haven&#8217;t really &#8220;started&#8221; work yet. This is the time I use to read my news.</p><p>Not every blog/site you follow will update content on the same day. If you run through them every morning before you start your &#8220;heads-down&#8221; development/design you&#8217;ll find 1, maybe 2 sites that have made updates.</p><p>Keeping up with your RSS is really important, especially if your one of those psycho/learn everything about everything Web designer (like me <img
src='http://www.csskarma.com/blog/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> P). I find that at least checking your feeds once a day, or even every other day can save you tons of time, energy and frustration in the long run.</p><p>But that&#8217;s just me hoping that I haven&#8217;t lost too many readers because of my month off <img
src='http://www.csskarma.com/blog/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ).</p><p>How do YOU keep up with your news?</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/keeping-up-with-the-times/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Quick iPhone Media Detection</title><link>http://www.csskarma.com/blog/quick-iphone-media-detection/</link> <comments>http://www.csskarma.com/blog/quick-iphone-media-detection/#comments</comments> <pubDate>Tue, 17 Jun 2008 19:20:57 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[php]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=67</guid> <description><![CDATA[I finally got around to reading David Shea&#8217;s post on MediaTyping today and as I was going through it, I asked myself if all the PHP he was using was really necessary. It sure wasn&#8217;t for what I wanted to do. I just wanted to detect an iPhone or iPod to test out some interfaces. [...]]]></description> <content:encoded><![CDATA[<p>I finally got around to reading <a
href="http://mezzoblue.com/archives/2008/03/18/mediatyping/" rel="external">David Shea&#8217;s post on MediaTyping</a> today and as I was going through it, I asked myself if all the PHP he was using was really necessary. It sure wasn&#8217;t for what I wanted to do. I just wanted to detect an iPhone or iPod to test out some interfaces.</p><p>I did some digging around after that and came across a short post on <a
href="http://www.iphoneappr.com/howto.php?id=1" rel="external">iPhoneAppr</a> about how to auto-detect a browser based on the user agent (what is essentially the browser).</p><h4>The HTTP User Agent</h4><p>When you visit a web page, your user agent changes based on the media you&#8217;re using. So, right now, if you&#8217;re using Firefox 2 your user agent string looks something like this:</p><pre><code>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14)
Gecko/20080404 Firefox/2.0.0.14</code></pre><p>and if you&#8217;re on an iPhone it will look something like this:</p><pre><code>Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like
Gecko) Version/3.0 Mobile/4A102 Safari/419.3</code></pre><p>As you can see, the user agent string has some key difference. The iPhone agent actually says &quot;iPhone&quot; in it. With this in mind we can use a neat little function built into PHP 5 called <a
href="http://us2.php.net/stripos" rel="external">stripos</a> to search the user agent and return some code (like code to send someone to a mobile version of a web site).</p><p>Let&#8217;s just get into it shall we? Here&#8217;s the PHP:</p><pre><code>&lt;?php
//setting the variables
ipod = stripos($_SERVER['HTTP_USER_AGENT'],&quot;iPod&quot;);
$iphone = stripos($_SERVER['HTTP_USER_AGENT'],&quot;iPhone&quot;);

//detecting device
if ($ipod == true || $iphone == true){
    echo &quot;iPhone or iPod&quot;;
    } else {
    echo &quot;Screen&quot;;
}
?&gt;</code></pre><p><code>Stripos</code> is a function that takes 2 arguments. The first is what you want to search (the haystack) and the second is what you want to search for (the needle). If the <em>needle</em> is found in the <em>haystack</em> it will return &quot;true&quot;, and if not, it will return false. An important thing to note about <code>stripos</code> is that it&#8217;s case insensitive[edit], so if you have some initial trouble, check your spacing and maybe try trim().</p><h4>Trouble I had</h4><p>In the PHP manual it says to use === when checking the value (which is for an exact match, true=true), but for some reason that didn&#8217;t work for me so I used == (match, but not exact so true=true &amp; true=1 for boolean values). It&#8217;s usually just a spacing issue, but I&#8217;m not real sure this time. Feel free to tell me I&#8217;m wrong.</p><p><a
href="http://www.csskarma.com/lab/mediatyping/">view live demo</a></p><p>I like this, it&#8217;s pretty easy, light, and useful if you just want an iPhone/iPod interface.</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/quick-iphone-media-detection/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 7/14 queries in 0.027 seconds using disk: basic

Served from: www.csskarma.com @ 2012-02-09 16:07:40 -->
