Home arrow Web Standards arrow Page 3 - Configuring Firefox for Chrome and a Server
WEB STANDARDS

Configuring Firefox for Chrome and a Server


If you have been building Internet applications with XUL, you'll appreciate this four-part article series. It explains how to prepare such an application for a commercial setting. This article is excerpted from chapter four of Programming Firefox, written by Kenneth C. Feldt (O'Reilly, 2007; ISBN: 0596102437). Copyright © 2007 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

Author Info:
By: O'Reilly Media
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
June 05, 2008
TABLE OF CONTENTS:
  1. · Configuring Firefox for Chrome and a Server
  2. · Running as a Local Installation
  3. · Package Registration
  4. · Configuring the Server

print this article
SEARCH DEVARTICLES

Configuring Firefox for Chrome and a Server - Package Registration
(Page 3 of 4 )

Every time the Firefox browser launches, its framework looks for any file with an extension of .manifest to inform it of the chrome content packages, skins, or locales that need to be loaded. To inform Firefox of our NewsSearch application, we will use a text editor to create a line for a file named localApps.manifest (any unique filename with a .manifest extension will do) and save it in Firefox’s chrome directory:

  content newssearch NewsSearch/content/newssearch.xul

The format of this line consists of space-delimited entries as follows:

  • The first field,content, declares the installation to be a content package. Other options includeskinandlocale.
  • Thenewssearchentry names the package.
  • The last entry is the source file location relative to the chrome directory.

We can now launch Firefox and type the chrome URL directly in the locator window to launch the same application, but within a browser window (see Figure4-4 ).


Figure 4-4.  Specifying the package name, and specifying the package type as a chrome URL

Once we make this entry in the URL bar, Firefox will autocomplete the line to add the filename that matches the package name—in this case, our newssearch.xul file.

Alternatively, we could launch our application directly from the command line, using the–chromeoption and a chrome URL that specifies our package name and package type:

  firefox –chrome chrome://newssearch/content/

Figure 4-5 illustrates the results of launching our chrome application from the command line and entering correct login information, for both a Windows and an OS X implementation of the same code.

XUL-to-Server Communications

A user can communicate to a server using several models, including a XUL application that runs locally while obtaining needed server information through asynchronous HTTP requests. Using this approach, the local application is in complete control of the user interface, with the server providing only textual information in response to requests. Here are the steps for implementing this model:

  1. Configure a web server.
  2. Install a scripting language to provide logic that manages communications with a client application.
  3. Implement the communication connection between the application and the server.
  4. Add a database on the server to communicate with the scripting language.


Figure 4-5.  OS X and Windows presentation of newssearch.xul (after simulated login)


blog comments powered by Disqus
WEB STANDARDS ARTICLES

- Mozilla Popcorn Maker 1.0 Makes Videos More...
- Completing a Configuration for Chrome and a ...
- Getting Connected with Firefox and Chrome
- Configuring Servers and Databases with Chrome
- Configuring Firefox for Chrome and a Server
- Designing the Elements of a Web Page
- Matching div heights with CSS and JavaScript
- Forms
- Get Down With Markup
- If I Said You Had a Beautiful Body...
- Web Standards in Dreamweaver Part 3
- Web Standards in Dreamweaver, Part 2
- Web Forms
- Making Lists Using XHTML
- Web Standards in Dreamweaver, Part 1

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials