The Linux distillery
Bringing the world of Linux to you, David cuts through the tech and shows you how it works and how to use it, in terms that apply to any distro. RSS
Technology news and Jobs arrow The Linux distillery arrow Firefox hero: Legends of FOSS
Firefox hero: Legends of FOSS PDF E-mail
by David M Williams   
Thursday, 06 December 2007
Where Firebug really stands on its own is how it lets you edit any part of the HTML page right then and there and see the changes immediately. You can change HTML markup, you can modify CSS styles, and you can modify JavaScript, without any need to close your browser or reload the page. Just fix the problem, add extra debugging statements or what have you and continue. The sheer magnitude of this shouldn’t be underestimated. Give it a try and your approach to web development will never be the same again.

Firebug goes on: a JavaScript profiler shows the speed of execution of your code. You can find which functions are grinding to a halt and then focus your optimisation efforts on these key pain points for maximum return in the shortest amount of time.

Other features let you drill right into the document object model (or DOM) and see all the properties of your page. Once again, you can modify any value on the fly and keep running the page.

Note carefully there’s a known Firefox issue which will prevent Firebug running. If Firebug fails for you, open Firefox’s special URL about:buildconfig. If you see a line reading
-disable-jsd
then it’s not going to work; you need to get a different build of Firefox, or download and compile the source yourself. Be sure to include these build options
--enable-jsd --enable-extensions=default,typeaheadfind,venkman

With this build of Firefox, you’ll find Firebug works fine.

YSlow
This next Firefox add-on – which is also integrated with Firebug above – is another must-have and one which will again raise the envy of IE users. It also is free and open source.

YSlow analyses web pages and tells you just why they are slow, based on rules for high performance web sites as determined by Yahoo!’s so-called “Exceptional Performance team.”

These rules aren’t just guesses; the crowd at Yahoo! have figured out 13 ways to dramatically cut down load time and file size of web sites. These include some which are obvious like making fewer HTTP requests in general and removing duplicate scripts, but also some which you may not have considered. For instance, Yahoo!’s team discovered that putting stylesheets in the document head make pages load faster, because the page can render as it loads without having to wait for style information. Other items include stripping all unnecessary whitespace out of JavaScript which reduces human readability but increases computer performance, as well as adding content expiry headers that give caches confidence they don’t need to check for new versions.

YSlow puts this theory into practicality. Set YSlow onto a poorly-performing web page and it will generate a series of views giving heavy-duty information on the problems.

Firstly, the performance view lists the 13 mantras giving a grading for each. An ‘A’ grade means the page ranks highly for that criteria. Expending any effort on these areas will not provide any noticeable gain. By contrast, a ‘C’ grade or worse highlights a definite situation that is impinging on the load and display speeds of the page.

YSlow won’t just point out the problem locations, but will also give some advice and information. It will tell you how many external images or stylesheets or JavaScript modules or other items you’re loading. It will tell you how many DNS lookups you’re forcing on the user. It will show you where CSS is defined in the page body.

That’s just the beginning; there’s more to come.



 
< Next story in category   Previous story in the category >
iTWire user statistics Visitors last 30 days
Suscribers
904,266
13,751
#1 independent technology news advertise here
  •   *  
  • Search
  • AdvSeach
  • Login
  • Events
  • FreeStuff
Subscribe to our free e-newsletter