Topic: javascript

Aspen Simulator - Simulates iPhone Safari Browser

The latest release of the iPhone SDK from Apple comes with an array of new Mac utilities for developing iPhone specific software. One of the new tools included with the iPhone SDK beta is the Aspen Simulator. Aspen is an iPhone simulator that developers can test their apps on which emulates all of the the features and functionality of the iPhone. For example you can use the mouse to swipe the page up, down, even pinch and more. Continue »

Sniff and Disable Firebug Howto (Gmail example)

Here is a simple test to see if users have Firebug installed on their browsers. Obviously this would also weed out non-FireFox users.

if (window.console && window.console.firebug) {
  alert("found Firebug");
}else{
  alert("can't find Firebug");
}

Continue »

Simple AJAX Request and Response JavaScript

Here is the simple form of an AJAX call made to an XML document, parsing through the returned document and and grabbing the a specific node from the DOM. There is a try/catch clause to handle the 4 different sets of XMLHTTP objects for different browsers. The callback function is called once the response is returned as 4+200 and the response is rendered to the user. Below is the JavasScript code snippet. Continue »

How to Boost Your JavaScript and CSS Performance

Lines of markup code per website are growing at a hurried pace these days. JavaScript and CSS files are getting bigger by the day. But you want to keep your site lean and speedy and avoid from becoming slow and bloated. There are some basic techniques I use to optimize JavaScript files and the same ideas can be applied to CSS and HTML files as well. I’ll briefly cover 4 popular solutions, namely validating, joining, shrinking and compressing your markup source code. Continue »

FireBug Tips and Tricks

There is so much power packed into this little FireFox plug-in. It is truly a revolutionary tool for web developers. Here is a quick and dirty set of its most powerful features.

To get started, open up firebug using F12 or by clicking its icon in the lower right corner of FireFox. To jump straight to the console and start typing commands you can use the Ctrl+Shift+L keyboard shortcut. Continue »