Mozilla

Create dynamic Firefox user interfaces

There is a intresting tutorial posted on IBM developerWorks site about creating dynamic Firefox user interfaces. This tutorial covering the following topics:

  • Define a skeleton user interface that populates dynamically.

  • Use Ajax to download XML data into Firefox.

  • Use XSLT to create XUL elements that you then add to the application.

Cross-Site XMLHttpRequest

John Resig continue exploring the new features of Firefox 3 browser. This time he post about Cross-Site XMLHttpRequest. He write following

«In a nutshell, there are two techniques that you can use to achieve your desired cross-site-request result: Specifying a special Access-Control header for your content or including an access-control processing instruction in your XML.»

FUEL - JavaScript API for Firefox

FUEL 0.1  shipped with Firefox starting with 1.9a5 version.

You can check it on the it's home page

Also you can check progress(development of the FUEL 0.2) and some examples of usage  on the John Resig post

Mozilla Thunderbird 2 Released

Scott MacGregor of Team Thunderbird writes in with news of the release of Mozilla Thunderbird 2: "Thunderbird 2 is now available for download on Windows, Mac and Linux in over 35 languages. Thunderbird 2 offers easy ways to manage and organize your email with message tags, advanced folder views, message history navigation, find as you type, and improved new mail alert notifications. Thunderbird 2 also includes a refreshed user interface and support for Microsoft Vista.

JavaScript Updates in Firefox 3.0a3

lientLeft and clientTop are now supported.

These two properties have long been a part of Internet Explorer and are now making their way into Firefox. This is to complement the clientHeight and clientWidth properties that already exist.

What these properties provide can be best described through a diagram; luckily, the Mozilla Developers Wiki already has some nice ones, so I'm just going to repost them here:

clientLeft

clientTop

While they're not terribly exciting properties to have, it's good to finally have a full set to work with.

You can hide cookies from scripts.

This one might seem rather innocuous, at first, but is a huge win in the Cross-Site Scripting (XSS) war. More often, than not, the true reward for performing some form of XSS is snagging valuable session information from a user's cookies. This relies on the fact that client-side JavaScript is able to access all of the cookies set and sent by the server. However, this is no longer the case. An HttpOnly flag, proposed and implemented by Microsoft in Internet Explorer 6, is now available in Firefox 3.0. A server, when setting a new cookie, can include the HttpOnly flag and know that the JavaScript won't have access to it. Of course, this isn't completely effective until all browsers have this property implemented, but it's certainly a step in the right direction.

Example:

Set-Cookie: sessionid=1234567; domain=mozilla.org; HttpOnly

You can mark resources as being available offline.

This is an interesting feature that doesn't, yet, have a specification-home (although, some suspect that it'll be adopted by the WHATWG). It provides the ability, for the user, to specify individual resources for special caching, should the browser move into offline mode.

In my personal tests, I was able to get it such that an XML file, specified exclusively as an "Offline Resource", was able to be retrieved, using an XMLHttpRequest, even while being disconnected from the Internet. You can view a demo here (Make sure that you're running, at least Firefox 3.0a3.) The relevant code, from the test page, is as follows:

  1. ...
  2. <head>
  3.     <link rel="offline-resource" href="test.xml"/>
  4.     <title>Offline Resource Test</title>
  5.     <script>
  6.     window.onload = function(){
  7.         var button = document.getElementById("button");
  8.         button.onclick = function(){
  9.             var xhr = new XMLHttpRequest();
  10.             xhr.open( "GET", "test.xml", true );
  11.             xhr.onreadystatechange = function(){
  12.                 if ( xhr.readyState == 4 ) {
  13.                     alert( xhr.responseXML
  14.                         .documentElement.firstChild.textContent );
  15.                 }
  16.             };
  17.             xhr.send( null );
  18.         };
  19.     };
  20.     </script>
  21. </head>
  22. ...

Joe Hewitt, Welcome to Firebug 1.0

Firebug 1.0 hit the wires at Mozilla on Wednesday night and Firebug??Ts author Joe Hewitt of Parakey Inc. stopped by Yahoo! Thursday to debut the new features.

Firebug 1.0: Public Beta

Joe Hewitt has been busy. We have loved the private builds of Firebug 1.0 beta, and he just made a bunch of announcements:

  • Firebug is to remain free: Very generous indeed. If you would like to support development, still check out the donate button. Joe wants to be able to hire someone to keep the torch well and truly light as he focuses on Parakey.
  • Firebug 1.0 beta available to all: I can not tease people in the coffee shop any longer as I watch them using 0.x and then show them 1.0 beta.
  • Firebug Lite: The lite version is for IE, Safari, and all non-Fire-y browsers. If you want to have the other browsers play happy with console.log() then use:
Syndicate content