<?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>Shekhar Govindarajan's Blog &#187; firefox</title>
	<atom:link href="http://www.shekhargovindarajan.com/tag/firefox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shekhargovindarajan.com</link>
	<description>My Notepad on the Web</description>
	<lastBuildDate>Tue, 07 Feb 2012 04:58:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com/" />
			<item>
		<title>Web Scraping with Firefox and PHP, using XPath</title>
		<link>http://www.shekhargovindarajan.com/scripts/web-scraping-with-firefox-and-php-using-xpath/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=web-scraping-with-firefox-and-php-using-xpath</link>
		<comments>http://www.shekhargovindarajan.com/scripts/web-scraping-with-firefox-and-php-using-xpath/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 02:00:58 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[automated]]></category>
		<category><![CDATA[automated Web scrapping]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[external tools]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firexpath]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP programmer]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[scheduler]]></category>
		<category><![CDATA[screen scraping]]></category>
		<category><![CDATA[tidy]]></category>
		<category><![CDATA[Tidy library]]></category>
		<category><![CDATA[Use Curl library]]></category>
		<category><![CDATA[web browser]]></category>
		<category><![CDATA[Web page lie]]></category>
		<category><![CDATA[Web scarping]]></category>
		<category><![CDATA[web scraping]]></category>
		<category><![CDATA[well-formed Web page An XPath expression]]></category>
		<category><![CDATA[well-formed Web page content]]></category>
		<category><![CDATA[well-formed Web pages]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=968</guid>
		<description><![CDATA[Last year, I faced two projects which required automated Web scrapping &#8211; to aggregate content from web pages. I evaluated different methods for Web scraping with varied level of success. Thanks to the changing structure of Web pages, non well-formed pages and URL redirects. Amongst using regular expressions and DOM (Document Object Model) parsing, I [...]]]></description>
			<content:encoded><![CDATA[<p>Last year, I faced two projects which required automated Web scrapping &#8211; to aggregate content from web pages. I evaluated different methods for Web scraping with varied level of success. Thanks to the changing structure of Web pages, non well-formed pages and URL redirects.</p>
<p>Amongst using regular expressions and DOM (Document Object Model) parsing, I used XPath too. XPath works great for well-formed Web pages. <span id="more-968"></span>A HTML Web page is called well-formed when all the opening tags have corresponding closing tags and the tags are nested properly (refer to <a href="http://en.wikipedia.org/wiki/Well-formed_element" target="_blank">this link</a> for more). A well-formed HTML page is also called an XHTML page.</p>
<p>XPath is a query language to access content on a well formed page &#8211; XHTML or XML. All the content in a Web page lie within HTML elements or tag pairs. The following is needed to extract out the content, of interest, using XPath from a Web page:</p>
<ol>
<li>A well-formed Web page</li>
<li>An XPath expression for the HTML element of interest</li>
<li>XPath query using the expression</li>
</ol>
<p>An XPath expression looks as cryptic as  .//*[@id='home_featured']/div. Here is where Firefox web browser with a plugin called FireXPath comes to help (as explained below). The second and third requirements are met by PHP (in my case) which is used for automated Web scrapping using the XPath expression.</p>
<p><strong>Click and build XPath expressions<br />
</strong>Building the cryptic XPath expression is easy and intuitive with Firefox and a couple of its plugins &#8211; namely Firebug and FireXPath. Install Firebug from <a href="https://addons.mozilla.org/en-US/firefox/addon/1843" target="_blank">here</a>, followed by FireXPath from <a href="https://addons.mozilla.org/en-US/firefox/addon/11900" target="_blank">here</a> and restart Firefox. As of this writing, I&#8217;m using the following versions of Firefox and the plugins:</p>
<ul>
<li>Firefox 3.5.6</li>
<li>Firbug 1.4.5</li>
<li>FireXPath 0.9.1</li>
</ul>
<p>After, the Firefox restart, browse to the Web page of your interest. Next:</p>
<ul>
<li>Launch Firebug by clicking on the bug like icon on the right corner of the status bar.</li>
<li>Click on the tab named XPath (in FireBug)</li>
<li>Click on the arrow (blue arrow) and move your mouse over the content, of interest, on the web page</li>
<li>Once the required chunk is highlighted (with a blue border), note down the XPath expression in the textfield.</li>
</ul>
<p>For example, the screenshot below, shows the XPath expression (.//*[@id='home_featured']/div  ) for the &#8220;Featured Post&#8221; chunk, on the home page, of this blog:</p>
<div id="attachment_974" class="wp-caption alignleft" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2010/01/XPath-Expression-With-FireXPath.png"><img class="size-medium wp-image-974   " style="display: block;" title="With FireXPath, point your mouse on the chunk/element of interest, to build an XPath expression" src="http://www.shekhargovindarajan.com/wp-content/uploads/2010/01/XPath-Expression-With-FireXPath-300x284.png" alt="With FireXPath, point your mouse on the chunk/element of interest, to build an XPath expression" width="300" height="284" /></a><p class="wp-caption-text">With FireXPath, point your mouse on the chunk/element of interest, to build an XPath expression</p></div>
<p>A few examples of XPath expressions:</p>
<ul>
<li>.//*[@id='latest_post']/span[1] : The posted and modified dates of the latest post on this blog &#8211; http://www.shekhargovindarajan.com</li>
<li>.//*[@id='top-stories']/div[1]/h2/a : The headline of the top story on Google News &#8211; http://news.google.com</li>
<li>.//*[@id='mp-tfa']/p[1] : Contents of featured article on Wikipedia &#8211; http://en.wikipedia.org/wiki/Main_Page</li>
</ul>
<p><strong>Automated scarping using PHP<br />
</strong>With the XPath expression in hand, a PHP script as follows, can extract out the required content from the Web page:</p>
<pre>&lt;?php

class WebScrap
	{
	private $url;
	private $xpath;

	public function WebScrap($url,$xpath)
		{
		$this-&gt;url = $url;
		$this-&gt;xpath = $xpath;
		}

	public function GetScrap()
		{
		// use Tidy to try to make the page well formed
		$page = $this-&gt;TidyIt($this-&gt;url);

		// create a document out of the well formed content
		$domDocument=new DOMDocument();
		$domDocument-&gt;loadHTML($page);

		// create an XPath object out of the document and query it for the supplied xpath
		$domXPath = new DOMXPath($domDocument);
		$domNodeList = $domXPath-&gt;query($this-&gt;xpath);

		// Get the content (HTML) out of the NodeList returned by the DOMXPath::query
		$content = $this-&gt;GetHTMLFromNodeList($domNodeList);

		return $content;
		}

	private function TidyIt($url)
		{
		$tidy = new tidy();
		$tidy-&gt;parseFile($url);
		$tidy-&gt;cleanRepair();
		return $tidy;
		}

	private function GetHTMLFromNodeList($domNodeList)
		{
		$domDocument = new DOMDocument();

		$node = $domNodeList-&gt;item(0);   

		foreach($node-&gt;childNodes as $childNode)
			$domDocument-&gt;appendChild($domDocument-&gt;importNode($childNode, true));

		return $domDocument-&gt;saveHTML();
		}

	}

?&gt;</pre>
<p>Note that, the function/method called GetScrap( ) of the WebScrap PHP class first calls the TidyIt( ) method. This function uses the <a href="http://en.wikipedia.org/wiki/HTML_Tidy" target="_blank">Tidy</a> library to fix (if required) the HTML for well-formedness. The PHP class for Tidy is used to fetch the web page via the given URL and repair it. Henceforth the DomXPath object is used to query the well-formed Web page content for the XPath expression.</p>
<p>To use the above code, you will need to install PHP modules for XML and Tidy. On a RedHat/CentOS/Fedora Linux machine, these modules can be installed using the following command:</p>
<pre>yum install php-xml php-tidy</pre>
<p>Save the above code in a file named class.WebScrap.php (say). Subsequently, the WebScrap class can be used as:</p>
<pre>&lt;?php

include("class.WebScrap.php");
$scrap = new WebScrap("http://news.google.com",".//*[@id='top-stories']/div[1]/h2/a");
print($scrap-&gt;GetScrap());

?&gt;</pre>
<p>The code should be self explanatory for a seasoned PHP programmer. If not, shoot your questions via comments to this post. For repeated and automated Web scarping, a scheduler like Cron can be used to execute the above PHP script at regular intervals and fetch the latest content.</p>
<p><strong>The Leftovers<br />
</strong>The code above is readable, crisp and focusses on the subject. For this reason, it has deliberate exclusions.  In a real world application, you should:</p>
<ul>
<li>Use <a href="http://php.net/manual/en/book.curl.php" target="_blank">Curl</a> library in PHP  or external tools like <a href="http://en.wikipedia.org/wiki/Wget" target="_blank">Wget</a> to fetch the URL. Then pass on the fetched content to Tidy. Hint: use the  parseString( ) of Tidy instead of parseFile( )</li>
<li>Handle errors in case of errors in Tidy and XPath.</li>
<li>Fallback to other means (say regular expressions) in case of errors in Tidy or XPath querying</li>
</ul>
<p>Note that XPath may not always give you the structured content that you desire. For example, using the expression .//*[@id='latest_post']/span[1] (for posted and modified dates of the latest post on this blog) will result into something as follows:</p>
<pre>&lt;strong&gt;Posted on:&lt;/strong&gt;
January 8, 2010
&lt;span class="dot"&gt;⋅&lt;/span&gt;
&lt;strong&gt;Last modified:&lt;/strong&gt;
January 8, 2010 @ 4:49 pm</pre>
<p>So there are tags and text (like &#8220;Posted on:&#8221; and &#8220;Last modified:&#8221;) to be stripped out, to get the posted date (January 8, 2010) and the modified date (January 8, 2010 @ 4:49 pm). For this, you may still have to use regular expressions and/or string manipulation functions like split( ).</p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=968&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/scripts/web-scraping-with-firefox-and-php-using-xpath/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Firefox 3.5 (Final) on Fedora 11</title>
		<link>http://www.shekhargovindarajan.com/open-source/firefox-3-5-final-on-fedora-11/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=firefox-3-5-final-on-fedora-11</link>
		<comments>http://www.shekhargovindarajan.com/open-source/firefox-3-5-final-on-fedora-11/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 08:07:25 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[fedora 11]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firefox 3.5]]></category>
		<category><![CDATA[firefox beta 4]]></category>
		<category><![CDATA[koji]]></category>
		<category><![CDATA[nspr]]></category>
		<category><![CDATA[official]]></category>
		<category><![CDATA[xulrunner]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=739</guid>
		<description><![CDATA[Firefox 3.5, the final release, has made its debut and is ready for download from here. Typically (and unfortunately) it may take about a day or two for Firefox 3.5 final to appear in the Fedora 11 repositories and across all the mirrors. When it appears, upgrading from the current version (Beta 4) of FireFox [...]]]></description>
			<content:encoded><![CDATA[<p>Firefox 3.5, the final release, has made its debut and is ready for download from <a href="http://www.firefox.com" target="_blank">here</a>. Typically (and unfortunately) it may take about a day or two for Firefox 3.5 final to appear in the <a href="http://fedoraproject.org/index.html" target="_blank">Fedora 11</a> repositories and across all the mirrors. When it appears, upgrading from the current version (Beta 4) of FireFox to the final release would be a matter of issuing &#8216;yum install firefox&#8217;. But we may not have to wait!<span id="more-739"></span></p>
<p>In the meanwhile, issue the following commands in your Fedora 11 (32 bit) box to upgrade to the final release of Firefox. Note that we are installing the required packages from the <a href="http://koji.fedoraproject.org/koji/" target="_blank">Koji</a> repository:</p>
<ol>
<li>rpm -Uvh http://kojipkgs.fedoraproject.org/packages/nspr/4.8/1.fc11/i586/nspr-4.8-1.fc11.i586.rpm</li>
<li>rpm -Uvh http://kojipkgs.fedoraproject.org/packages/xulrunner/1.9.1/2.fc11/i586/xulrunner-1.9.1-2.fc11.i586.rpm</li>
<li>rpm -Uvh http://kojipkgs.fedoraproject.org/packages/firefox/3.5/1.fc11/i586/firefox-3.5-1.fc11.i586.rpm</li>
</ol>
<p>The above RPMs will need to be installed in the same order. If you are using 64 bit Fedora or are on other architecture (like ppc), download and install the packages named nspr, xulrunner and firefox from the following web pages:</p>
<ul>
<li>nspr: <a href="http://koji.fedoraproject.org/koji/buildinfo?buildID=112313" target="_blank">http://koji.fedoraproject.org/koji/buildinfo?buildID=112313</a></li>
<li>xulrunner: <a href="http://koji.fedoraproject.org/koji/buildinfo?buildID=112385" target="_blank">http://koji.fedoraproject.org/koji/buildinfo?buildID=112385</a></li>
<li>firefox: <a href="http://koji.fedoraproject.org/koji/buildinfo?buildID=112334" target="_blank">http://koji.fedoraproject.org/koji/buildinfo?buildID=112334</a></li>
</ul>
<p>Eventually these packages will be pushed and available through the official Fedora mirrors., but till that time, enjoy!</p>
<p><strong>Update (July 5, 2009):</strong> Firefox 3.5 Final has been available from the Fedora 11 repositories, as I <a href="http://twitter.com/shekharg/status/2436562818" target="_blank">mentioned</a> a few days back. A simple &#8216;yum update firefox&#8217; will do the update to the final version on Fedora 11. This makes <strong>the above content outdated. </strong></p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=739&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/open-source/firefox-3-5-final-on-fedora-11/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Chromified Firefox</title>
		<link>http://www.shekhargovindarajan.com/open-source/chromified-firefox/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=chromified-firefox</link>
		<comments>http://www.shekhargovindarajan.com/open-source/chromified-firefox/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 15:30:53 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[add-on site]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[chrome add-ons]]></category>
		<category><![CDATA[chrome package]]></category>
		<category><![CDATA[chromifox]]></category>
		<category><![CDATA[distrust]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Firefox's status bar]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[incognito]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[look alike]]></category>
		<category><![CDATA[look like]]></category>
		<category><![CDATA[private browsing]]></category>
		<category><![CDATA[speed dial]]></category>
		<category><![CDATA[total rechrome]]></category>
		<category><![CDATA[visited site]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=434</guid>
		<description><![CDATA[In a half an hour attempt to make Firefox look like Google Chrome with some similar functionality, I achieved the following:The Chromification was achieved with Firefox 3.0.2 (on my Fedora 9 laptop) with the following Firefox Add-ons: Chrome Package (for Chrome look and feel) Speed Dial (Chrome like most visited site) Distrust (Private browsing or [...]]]></description>
			<content:encoded><![CDATA[<p>In a half an hour attempt to make Firefox look like Google Chrome with some similar functionality, I achieved the following:
<a href='http://www.shekhargovindarajan.com/open-source/chromified-firefox/attachment/firefox/' title='Firefox'><img width="150" height="150" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/firefox-150x150.jpg" class="attachment-thumbnail" alt="Firefox" title="Firefox" /></a>
<a href='http://www.shekhargovindarajan.com/open-source/chromified-firefox/attachment/chrome/' title='Chrome'><img width="150" height="150" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/chrome-150x150.jpg" class="attachment-thumbnail" alt="Google Chrome" title="Chrome" /></a>
<a href='http://www.shekhargovindarajan.com/open-source/chromified-firefox/attachment/chromified_firefox/' title='Chromified Firefox'><img width="150" height="150" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/chromified_firefox-150x150.jpg" class="attachment-thumbnail" alt="Chromified Firefox" title="Chromified Firefox" /></a>
<span id="more-434"></span>The Chromification was achieved with Firefox 3.0.2 (on my <a href="http://fedoraproject.org/" target="_blank">Fedora 9</a> laptop) with the following Firefox Add-ons:</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/8790" target="_blank">Chrome Package</a> (for Chrome look and feel)<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/4810" target="_blank">Speed Dial</a> (Chrome like most visited site)<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/1559" target="_blank">Distrust</a> (Private browsing or Incognito)</p>
<p>To download Chrome Package, you will need to register and login. After downloading, installing the add-ons and restarting Firefox, you will be greeted by the Chromified Firefox. Note that, in the &#8220;Chromified Firefox&#8221; screenshot, I have hidden the Firefox toolbars (like Google, Bookmark and other toolbars) to make Firefox look alike as much as Chrome <img src='http://www.shekhargovindarajan.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Note that these add-ons make Firefox look similar and function partially like Chrome. Do not expect the same look and feel and exact functionality/features.</p>
<p><strong>Chrome Package</strong><br />
This add-ons brings in the Chrome look and feel to Firefox. Note the tabs going above the location bar, change of icons and the + icon besides the latest tab to open a new tab.<strong><br />
Windows Vista users </strong>can try the <a href="https://addons.mozilla.org/en-US/firefox/addon/9322" target="_blank">Total ReChrome</a> addon, instead of Chrome Package. This add-on requires another add-on called <a href="https://addons.mozilla.org/en-US/firefox/addon/8782" target="_blank">Chromifox</a> to be pre-installed. I found it while searching for Chrome add-ons and I haven&#8217;t tried it myself. This add-on does not work in Linux.</p>
<p><strong>Speed Dial</strong><br />
This add-on shows the most visited site when a new Firefox window or tab is opened. After a Firefox restart, Speed Dial&#8217;s configuration pops up. On this, I checked/selected the following options:</p>
<ul>
<li>Load in blank new windows</li>
<li>Load in blank new tabs</li>
<li>Set Speed Dial as home page</li>
</ul>
<p>Note that unlike Google Chrome, Speed Dial does not automatically display the most visited site. You will need to bookmark your favourite sites via Bookmarks&gt;Set as Speed Dial.</p>
<p><strong>Distrust<br />
</strong>This facilitates the private browsing or the Incognito mode in Chrome. You may like to read about its functionality <a href="https://addons.mozilla.org/en-US/firefox/addon/1559" target="_blank">here</a>. It displays an &#8220;eye&#8221; like icon on the right side of the Firefox&#8217;s status bar. Clicking on the icon shows a green tick and starts the private browsing. From here on, any URL visits, form fillups, download history etc, are not stored. Note that, in Chrome the private browsing is started by launching a new window called the Incognito window. Hence Distrust gives similar features but not the same functionality.</p>
<p>I found the first two by searching for &#8220;chrome&#8221; on the <a href="https://addons.mozilla.org/en-US/firefox/" target="_blank">Firefox add-on site</a>. Found Distress by searching for &#8220;private browsing&#8221;. If you are able to find more, let me know <img src='http://www.shekhargovindarajan.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=434&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/open-source/chromified-firefox/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Fennec &#8211; Firefox for mobiles</title>
		<link>http://www.shekhargovindarajan.com/open-source/fennec-firefox-for-mobiles/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fennec-firefox-for-mobiles</link>
		<comments>http://www.shekhargovindarajan.com/open-source/fennec-firefox-for-mobiles/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 10:48:27 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[2003]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Awesome Bar]]></category>
		<category><![CDATA[fennec]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[minimo]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobile phones]]></category>
		<category><![CDATA[n810]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[Nokia N810]]></category>
		<category><![CDATA[output devices]]></category>
		<category><![CDATA[pocket pc]]></category>
		<category><![CDATA[Shekhar Govindarajan]]></category>
		<category><![CDATA[the Firefox]]></category>
		<category><![CDATA[typical web browser button]]></category>
		<category><![CDATA[typical web browsing]]></category>
		<category><![CDATA[United States]]></category>
		<category><![CDATA[web browser]]></category>
		<category><![CDATA[windows mobile]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=392</guid>
		<description><![CDATA[We love Firefox on our desktops and now there is Firefox for our mobiles &#8211; called Fennec. Fennec is a web browser for mobiles (phones, PDAs and small screen tablets) released by Mozilla. As of this writing, it is in Alpha 1. Fennec Alpha 1 is available only for Nokia N810 tablets running Maemo. But [...]]]></description>
			<content:encoded><![CDATA[<p>We love Firefox on our desktops and now there is Firefox for our mobiles &#8211; called <a href="http://www.mozilla.org/projects/fennec/1.0a1/releasenotes/" target="_blank">Fennec</a>. Fennec is a web browser for mobiles (phones, PDAs and small screen tablets) released by Mozilla. As of this writing, it is in Alpha 1.</p>
<p>Fennec Alpha 1 is available only for Nokia N810 tablets running Maemo. But I own a Windows Mobile. Fortunately, Fennec is downloadable for Windows, Linux and Mac desktops &#8211; for users (like me) to see its glimpse, test it and give feedback.</p>
<p>I downloaded the Linux version from <a href="http://ftp.mozilla.org/pub/mozilla.org/mobile/fennec-1.0a1.en-US.linux-i686.tar.bz2" target="_blank">here</a>. Extracted the archive (tar -jxvf fennec-1.0a1.en-US.linux-i686.tar.bz2). This produced a directory named fennec.  Changed to this directory and launched Fennec by issuing ./fennec.</p>
<div id="attachment_395" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-first-launch.jpeg"><img class="size-medium wp-image-395" title="fennec-first-launch" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-first-launch-300x187.jpg" alt="Fennec - The first launch" width="300" height="187" /></a><p class="wp-caption-text">Fennec - The first launch</p></div>
<p><span id="more-392"></span>With the aim not being a full fledged review of Fennec (since it is in alpha), following are a few noteworthy features:</p>
<p><strong>Awesome bar:</strong> Like Firefox 3, Fennec shows the earlier visited sites as you start typing in a URL. It shows the URL and title of the sites. This allows you to quickly jump to the URL without much typing:</p>
<div id="attachment_396" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-awesomebar.jpeg"><img class="size-medium wp-image-396" title="fennec-awesomebar" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-awesomebar-300x180.jpg" alt="Awesome Bar" width="300" height="180" /></a><p class="wp-caption-text">Awesome Bar</p></div>
<p><strong>Optimizes Website&#8217;s dimension:</strong> Seems Fennec tries its best to horizontally fit a web page to the viewable area. A website can be scrolled vertically by dragging the mouse from bottom to top.  Following is how my Blog looks in Fennec:</p>
<div id="attachment_397" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-my-blog.jpeg"><img class="size-medium wp-image-397" title="fennec-my-blog" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-my-blog-300x180.jpg" alt="Shekhar Govindarajan's Blog in Fennec" width="300" height="180" /></a><p class="wp-caption-text">Shekhar Govindarajan&#39;s Blog in Fennec</p></div>
<p><strong>Tab browsing:</strong> As hinted on the first launch screen, drag the mouse, to the right, on the Fennec window and you will see the tabs panel. It shows the preview of all the currently open tabs as shown below:</p>
<div id="attachment_398" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-tabbed-browsing.jpeg"><img class="size-medium wp-image-398" title="fennec-tabbed-browsing" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-tabbed-browsing-300x187.jpg" alt="Tabbed browsing in Fennec" width="300" height="187" /></a><p class="wp-caption-text">Tabbed browsing in Fennec</p></div>
<p>You can launch a new tab by clicking on the + button or remove a launched tab by clicking on the &#8211; button on the tab preview. Fennec automatically launches a separate tab for links which open in a new Window.</p>
<p><strong>Back, forward and favourite buttons</strong>: Dragging the mouse towards the left reveals the typical web browser button for Back, Previous and Bookmark/Favourites.</p>
<div id="attachment_399" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-back-previous-favourites.jpeg"><img class="size-medium wp-image-399" title="fennec-back-previous-favourites" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-back-previous-favourites-300x180.jpg" alt="Drag the mouse to the left to see the typical web browsing buttons" width="300" height="180" /></a><p class="wp-caption-text">Drag the mouse to the left to see the typical web browsing buttons</p></div>
<p><strong>Configuration/Preferences: </strong>Clicking on the wheel button (at the bottom), shown in the above screenshot, reveals the browser&#8217;s configuration or preferences option. But I was not able to select or change any option. Either I&#8217;m doing something wrong or it is the Alpha factor.</p>
<div id="attachment_400" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-preferences.jpeg"><img class="size-medium wp-image-400" title="fennec-preferences" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-preferences-300x187.jpg" alt="The preferences window" width="300" height="187" /></a><p class="wp-caption-text">The preferences window</p></div>
<p><strong>Remember password:</strong> Fennec showcases the same non-intrusive remember password prompt &#8211; as in Firefox 3 and Google Chrome. The remember password prompt is displayed on the top without stopping the subsequent (to the login) page from opening:</p>
<div id="attachment_401" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-remember-password.jpeg"><img class="size-medium wp-image-401" title="fennec-remember-password" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/10/fennec-remember-password-300x187.jpg" alt="Remember password prompt" width="300" height="187" /></a><p class="wp-caption-text">Remember password prompt</p></div>
<p>I browsed through GMail (non mobile version) using Fennec and found it to working fine. This means Fennec will be supporting JavaScript and AJAX intensive sites.</p>
<p><strong>Miscellaneous: </strong></p>
<ul>
<li>Fennec claims to support plugins and addons with several plugins like that for Java, Quicktime and DivX listed. But even after enabling them I could not see Java applets or Quicktime videos.</li>
<li>It seems to remember the data filled in form fields too and displays a small popup above the fields to assist in prefilling</li>
<li>Flash based websites did not work. There were no Flash plugins listed</li>
<li>While not a Fennec&#8217;s issue, Websites (like mine) are not detecting Fennec as a mobile browser. The user agent string emitted by Fennec (while running on a Linux desktop) is as follows:<em><br />
</em></li>
</ul>
<p><em> Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1</em></p>
<p>Note that Fennec is not the first mobile browser from Mozilla. Earlier Mozilla had released a web browser called <a href="http://www-archive.mozilla.org/projects/minimo/" target="_blank">Minimo</a>. Minimo is now found in the Mozilla archives. This means Fennec is the way forward. I had used Minimo on my earlier mobile which was a Windows Pocket PC (running Windows Mobile 2003). Minimo also supports tab browsing.</p>
<p>Fennec is said to use the Firefox&#8217;s design principles and the Gecko engine and hence I&#8217;m calling it the Firefox for mobiles. I&#8217;m not sure if Fennec and Firefox share the same code base.</p>
<p>Last but not the least, I played with Fennec on a Linux laptop with a mouse, keyword and a large screen. How well it works with a phone&#8217;s input and output devices can be told by someone who owns a Nokia tablet. It will also be interesting to see how the future versions of Fennec behave on smaller screens of mobile phones and PDAs.</p>
<p>Waiting eagerly for the WIndows Mobile version of Fennec &#8230;</p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=392&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/open-source/fennec-firefox-for-mobiles/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Slice out my latest post</title>
		<link>http://www.shekhargovindarajan.com/microsoft/slice-out-my-latest-post/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=slice-out-my-latest-post</link>
		<comments>http://www.shekhargovindarajan.com/microsoft/slice-out-my-latest-post/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 21:44:08 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[beta 2]]></category>
		<category><![CDATA[Favorites bar]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firefox 3]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[ie 8]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[internet explorer 8]]></category>
		<category><![CDATA[respective web sites]]></category>
		<category><![CDATA[syndicate]]></category>
		<category><![CDATA[syndication]]></category>
		<category><![CDATA[web browser]]></category>
		<category><![CDATA[web content]]></category>
		<category><![CDATA[web slice]]></category>
		<category><![CDATA[Web Slice Block]]></category>
		<category><![CDATA[Web Slice Body/Content]]></category>
		<category><![CDATA[Web Slice bookmark]]></category>
		<category><![CDATA[Web Slice preview]]></category>
		<category><![CDATA[Web Slice preview window]]></category>
		<category><![CDATA[Web Slice Title]]></category>
		<category><![CDATA[web slices]]></category>
		<category><![CDATA[webchunks]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=296</guid>
		<description><![CDATA[The second beta of the upcoming version  of Microsoft&#8217;s Internet Explorer (IE 8 ) web browser was released last month. One of the touted features of IE 8 is Web Slices. Many of us cut out articles from the newspapers if we find them interesting. Think of Web Slices to be cuttings from Web sites. [...]]]></description>
			<content:encoded><![CDATA[<p>The second beta of the upcoming version  of Microsoft&#8217;s Internet Explorer (IE 8 ) web browser was released last month. One of the touted features of IE 8 is <strong>Web Slices</strong>.</p>
<p>Many of us cut out articles from the newspapers if we find them interesting. Think of Web Slices to be cuttings from Web sites. But with a difference. If these cuttings (web content) are updated on the respective web sites, you will be notified, as well as your cuttings will be updated. Technically, you &#8220;subscribe to a Web Slice&#8221;, instead of saying cutting it off which may offend the webmasters <img src='http://www.shekhargovindarajan.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>The latest post on my Blog is Web Slice enabled (or say, it is a Web Slice). In fact, it is Web Slice enabled since some time. Perhaps, some of you (who are using IE 8 ) would have noticed it.</p>
<p><span id="more-296"></span></p>
<p>Other web sites which are Web Slice enabled are digg.com, ebay.com, facebook.com, msn.com etc.</p>
<p><strong>How to subscribe to a Web Slice</strong></p>
<p>To slice out the latest post or to subscribe to the latest post on my blog:</p>
<ul>
<li>Download and install IE 8 from <a href="http://www.microsoft.com/windows/internet-explorer/beta/default.aspx" target="_blank">http://www.microsoft.com/windows/internet-explorer/beta/default.aspx</a></li>
<li>Once installed, browse to my blog at <a href="http://www.shekhargovindarajan.com/" target="_blank">http://www.shekhargovindarajan.com</a>.</li>
<li>Wait for the site to load up completely.</li>
<li>Once loaded you will notice, the &#8220;Subscribe to Web Slices&#8221; icon (the second icon, after the home icon on the top right) turns green as shown in the screenshot below:</li>
</ul>
<div id="attachment_301" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/subscribe_to_web_slices.png"><img class="size-medium wp-image-301" title="subscribe_to_web_slices" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/subscribe_to_web_slices-300x187.png" alt="A green icon indicates Web Slice(s) on the page" width="300" height="187" /></a><p class="wp-caption-text">A green icon indicates Web Slice(s) on the page</p></div>
<ul>
<li>Clicking on the green icon, will show you a dialog box which prompts you to add the Web Slice. Clicking the Add button, on the dialog, will place a bookmark on the Favorites bar.</li>
<li>Alternatively, if you move your mouse over the latest post, you will see a green border around the latest post, and a green icon on the left, as shown below:</li>
</ul>
<div id="attachment_308" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/subscribe_to_web_slices_2.png"><img class="size-medium wp-image-308" title="subscribe_to_web_slices_2" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/subscribe_to_web_slices_2-300x187.png" alt="Move the mouse over the latest post to subscribe to the Web Slice" width="300" height="187" /></a><p class="wp-caption-text">Move the mouse over the latest post to subscribe to the Web Slice</p></div>
<ul>
<li>By clicking on the green icon you can subscribe to the Web Slice.</li>
<li>Clicking on this bookmark will show you the preview of the Web Slice (the content of my latest blog post), as shown in the screenshot below:</li>
</ul>
<div id="attachment_309" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/web_slice_preview.png"><img class="size-medium wp-image-309" title="web_slice_preview" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/web_slice_preview-300x187.png" alt="Web Slice Preview" width="300" height="187" /></a><p class="wp-caption-text">Web Slice Preview</p></div>
<ul>
<li>Clicking on the arrow (-&gt;) icon on the preview window will take you to the full blog post.</li>
</ul>
<p><strong>How does it work ?</strong></p>
<p>If I write a new blog post which, upon publish, becomes my latest post, the Web Slice bookmark on your IE will turn bold. By default, the Web Slice is checked for any updates once in a day. Upon an update, the Web Slice bookmark can turn bold or even play a sound.</p>
<p>Right click on the Web Slice bookmark. Click on &#8220;Bold on Update&#8221;. This will make the bookmark bold, upon an update.</p>
<p>To play and sound, right click on the bookmark and select Properties. Click on the Settings button under &#8220;Update Schedule&#8221;. Check the box labeled &#8220;Play a sound when a monitored feed or Web Slice is updated.</p>
<p>Notice the numerous other options in the Properties window. Note that you can setup when to check the Web Slice for updates &#8211; which is by default set to 1 day.</p>
<p><strong>How to enable Web Slice on your site</strong></p>
<p>Refer to the URL <a href="http://msdn.microsoft.com/en-us/library/cc848871(VS.85).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/cc848871(VS.85).aspx</a>. Read the section titled &#8220;Creating Web Slices&#8221;.</p>
<p>The rules are:</p>
<ol>
<li><strong>The Web Slice Block:</strong> You should have a HTML tag (like a &lt;DIV&gt;) enclosing the content that you want to Web Slice enable. This &lt;DIV&gt; tag must have the CSS class name set to &#8220;hslice&#8221; and must have an id. If you view source (the HTML source) of this blog, you will notice: &lt;<span class="start-tag">div</span><span class="attribute-name"> id</span>=<span class="attribute-value">&#8220;latest_post&#8221; </span><span class="attribute-name">class</span>=<span class="attribute-value">&#8220;hslice&#8221;</span>&gt; <span class="comment">Note that this &lt;div&gt; has the class set to hslice and id set to latest_post. The id must be unique. That is, no other element or tag on the page must have the same id. If you search for latest_post in the source, you will not find any other element with the same id.</span></li>
<li><span class="comment"><strong>The Web Slice Title: </strong>The title of the Web Slice or the content should be enclosed within a tag with the classname as entry-title. On my blog, I have given this class name to the anchor (&lt;a&gt;) tag which encloses the title of the latest blog post.<br />
</span></li>
<li><span class="comment"><strong>The Web Slice Body/Content:</strong> The content should be enclosed within a tag whose classname is entry-content. </span><span class="comment">Earlier the content of the latest post was enclosed within a paragraph tag (&lt;p&gt;). But giving the &lt;p&gt; tag, the class name as entry-title did not show the preview of the Web Slice (as shown in one of the screenshots above). Changing the &lt;p&gt; tag to a &lt;span&gt; tag showed the preview. Note that on my blog, the content of the latest post is either the full content (in some cases) or a part of the full content. In the latter case, clicking on continue reading shows you the full content. In the latter case, the Web Slice will be marked as updated only when I update the part of the content which shows in the latest post.<br />
</span></li>
</ol>
<p><span class="comment">To summarize, following is the markup structure of my latest blog post which is Web Slice enabled:</span></p>
<p>&lt;div id=&#8221;latest_post&#8221; class=&#8221;hslice&#8221;&gt;<br />
&#8212;<br />
&#8212;<br />
&lt;a class=&#8221;entry-title&#8221;  href=&#8221;&#8230;&#8221;&gt; the post title &lt;/a&gt;<br />
&#8212;<br />
&#8212;<br />
&lt;span class=&#8221;entry-content&#8221;&gt;<br />
the post content<br />
&lt;/span&gt;<br />
&#8212;<br />
&#8212;<br />
&lt;/div&gt;</p>
<p><strong>Issues with Web Slices</strong></p>
<p>Though Web Slices seem to be easy to implement, I thought of the following issues with them:</p>
<ol>
<li>For an existing site it may not be always straight forward to implement Web Slices if there are issues like &lt;p&gt; not working (as explained in point 3 in the above section). I would like to have no structure change to use Web Slices.</li>
<li>If you go through the link <a href="http://msdn.microsoft.com/en-us/library/cc848871(VS.85).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/cc848871(VS.85).aspx</a>, you will notice a line which says &#8220;The Web Slice preview window will not always display content the exact same  way it appears on a Web page; some of the formatting is stripped away&#8221;. I could not find the documentation on what formatting is stripped away. I can see that, the Web Slice preview magically removes the continue reading, comments and category links (which are at the bottom of the latest post). And it magically redirects to the full post, when clicking on the -&gt; (arrow) on the preview button. How come, it is detecting the first link as a useful link and discarding other links. I like magic but would like to read the documented logic behind it.</li>
<li>Web Slice only works with IE 8, officially (read &#8220;Web Slices with Firefox&#8221; below). Perhaps, <a href="http://en.wikipedia.org/wiki/RSS_(file_format)" target="_blank">RSS</a> still remains the cross browser standard which works well to notify about updates.</li>
</ol>
<p><strong>Web Slices with Firefox</strong></p>
<p>With Firefox 3 and a plugin called Webchunks, you can use Web Slices in Firefox! It is very similar to using it in IE. First install the plugin from the following link <a href="http://disruptive-innovations.com/zoo/webchunks/webchunks-0.30.xpi" target="_blank">http://disruptive-innovations.com/zoo/webchunks/webchunks-0.30.xpi</a>. This is the direct link to the plugin. So launch it in Firefox 3.Once installed, it will ask for a Firefox restart. After restart, if you navigate back to my blog (or any other Web Slice enabled) site, you can subscribe to the Web Slices in a very similar way as shown in the screenshots below:</p>
<div id="attachment_323" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/firefox_subscribe_to_web_slices.jpeg"><img class="size-medium wp-image-323" title="firefox_subscribe_to_web_slices" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/firefox_subscribe_to_web_slices-300x187.jpg" alt="Clicking on the blue icon (on the left) will allow you to subscribe to a Web Slice (if any) on the page" width="300" height="187" /></a><p class="wp-caption-text">Clicking on the blue icon (on the left) will allow you to subscribe to a Web Slice (if any) on the page</p></div>
<div id="attachment_324" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/firefox_subscribe_to_web_slices-2.png"><img class="size-medium wp-image-324" title="firefox_subscribe_to_web_slices-2" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/firefox_subscribe_to_web_slices-2-300x187.png" alt="You can also subscribe to a Web Slice by moving the mouse over the content" width="300" height="187" /></a><p class="wp-caption-text">You can also subscribe to a Web Slice by moving the mouse over the content, as in IE 8</p></div>
<div id="attachment_325" class="wp-caption alignnone" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/firefox_web_slice_preview.jpeg"><img class="size-medium wp-image-325" title="firefox_web_slice_preview" src="http://www.shekhargovindarajan.com/wp-content/uploads/2008/09/firefox_web_slice_preview-300x187.jpg" alt="The Web Slice preview in Firefox 3" width="300" height="187" /></a><p class="wp-caption-text">The Web Slice preview in Firefox 3</p></div>
<p>To sum up, I do like the visual slicing out (e.g. by moving the mouse over on the latest post) of content from the web pages. It is like I&#8217;m indeed cutting and taking off something from the website <img src='http://www.shekhargovindarajan.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Update:</strong></p>
<p>&#8220;And it magically redirects to the full post, when clicking on the -&gt; (arrow) on the preview button. How come, it is detecting the first link as a useful link and discarding other links. I like magic but would like to read the documented logic behind it.&#8221;</p>
<p>Found the logic behind this one. It follows the link (&lt;a&gt;) which has rel=&#8221;bookmark&#8221;. My latest blog post has two links (the title link and the continue reading link) whose rel=&#8221;bookmark&#8221;. Both of them point to the full post. So Web Slices is picking up one of them, either the first one or the last one. </p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=296&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/microsoft/slice-out-my-latest-post/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

