You are currently browsing the tag archive for the ‘firefox’ tag.

A good alternative browser to Safari on Mac OS X Leopard is Camino. Camino is based on Mozilla’s Gecko engine, so it operates much like Firefox on Mac, but a hell of a lot quicker.

Camino just released version 1.6.1 (May 20, 2008), which fixed stability and security issues from their last major release, 1.6, which was made available a month before that, so the latest release should be pretty solid.

Having offered Camino as an alternative to Safari, I actually not only still use Safari, but I also use Firefox, basically the three major browsers on Mac. Why the heck would I do this? Each browser has its benefits.

Camino

Best mix of speed, features, and compatibility. I still find certain javascript/ajax issues such as with Google Documents drop down menus, but not much beyond that. Did I mention blocking of all Flash Ads and Pop-ups, with exceptions or white-lists available for both? Hot.

Firefox

Best overall website compatibility. Lets face it, Apple still has a ways to go before Mac penetration gets beyond even 15% of the user base that Windows has. As such, most websites are optimized or tested for “Internet Explorer” and none other. This can lead to rendering issues on Mac browsers such as Safari and Camino. Firefox is the least susceptible to these compatibility issues, which are generally due to Internet Explorer not being standards compliant. But, that’s another story for another time, by another blogger.

Safari

Fastest browser. Faster than both Camino and Firefox. Safari is what I think of as a “light browser”: a lean, mean, browsing machine. This was the first browser for Mac and it’s the most “integrated” with the operating system. But, it lacks some “power-user” features that I can’t live without on a day to day basis. For example: text or link searching using “forward slash” or “single quote”. In Camino simply hit the “forward slash” key, start typing, and Camino will move to the next word containing the string of characters you are typing. Hitting Ctrl + G will move to the next match. The same works with “single quote” link searching. Once the link you’re searching for is found and highlighted, simply press Enter/Return and the link is opened. This is seriously efficient and fast browsing, much much faster than messing around with a mouse or trackpad and hovering the mouse pointer over the correct few centimeters of display in order to open links. Try this inline search feature on Camino and I bet you will love it.

Safari has its own search/find feature that’s pretty tight as well, highlighting the word you’re searching for and darkening the rest of the page. This is great for serious text reading on big documents, but for navigating and general surfing, I’d much rather have Camino’s inline search with keyboard navigation.

Error: uncaught exception: Permission denied to call method XMLHttpRequest.open FireFox/Mozilla browser fix / solution:

  • Go to address “about:config” in Firefox (i.e. type that in the address bar and hit Enter)
  • Search for “signed” in the filter bar
  • Double click the item “signed.applets.codebase_principal_support” to change its value to “true”
  • Create (or edit if already present) the “user.js” file found in the below directories. By default this file does not exist so create a new blank user.js file if you don’t find it in the following paths (as specified on Mozilla.org):
    • On Windows Vista/XP/2000, the path is usually %AppData%\Mozilla\Firefox\Profiles\xxxxxxxx.default\, where xxxxxxxx is a random string of 8 characters. Just browse to C:\Documents and Settings\[User Name]\Application Data\Mozilla\Firefox\Profiles\ on Windows XP/2000 or C:\users\[User Name]\AppData\Roaming\Mozilla\Firefox\Profiles\ on Windows Vista, and the rest should be obvious.
    • On Windows 95/98/Me, the path is usually C:\WINDOWS\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default\
    • On Linux, the path is usually ~/.mozilla/firefox/xxxxxxxx.default/
    • On Mac OS X, the path is usually ~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/
  • Place the following lines within user.js:

    user_pref("capability.policy.XMLHttpRequestToAnySite.XMLHttpRequest.open", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.sites", "http://localhost.com:3000");
    user_pref("capability.policy.XMLHttpRequestToAnySite.CDATASection.nodeValue", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.attributes", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.childNodes", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.firstChild", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.getAttribute", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.getElementsByTagName", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.lastChild", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.nodeName", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.nodeType", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.parentNode", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.tagName", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.nextSibling", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Element.previousSibling", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.HTMLCollection.length", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.HTMLCollection.item", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.attributes", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.childNodes", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.firstChild", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.getAttribute", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.getElementsByTagName", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.lastChild", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.nodeName", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.nodeType", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.parentNode", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.tagName", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.nextSibling", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.Text.previousSibling", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.XMLDocument.documentElement", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.XMLDocument.getElementsByTagName", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.XMLHttpRequest.channel", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.XMLHttpRequest.open", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.XMLHttpRequest.responseText", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.XMLHttpRequest.responseXML", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.XMLHttpRequest.send", "allAccess");
    user_pref("capability.policy.XMLHttpRequestToAnySite.XMLHttpRequest.setRequestHeader", "allAccess");
    user_pref("capability.policy.policynames", "XMLHttpRequestToAnySite");
  • Edit the line containing http://localhost.com:3000” and replace that URI with whatever URI you are developing on (or publishing to). For me it happens to be localhost.com:3000. Normally it would be just “localhost” for most people or localhost:3000 for Rails project developers.
  • Save the user.js file
  • Exit out of Firefox or other Mozilla based browser. If on Mac OS X, fully quit Firefox by hitting Cmd+Q, don’t just close the current browser window (which leaves Firefox still running in the background).
  • Launch FireFox again.
  • Exit out of Firefox again. The config file that Firefox actually uses to control the browser is called “prefs.js”, not “user.js”. user.js is the file that we, the end user, are supposed to make changes to, which are then copied over to prefs.js when Firefox is loaded. For whatever reason, the prefs.js file will not be updated with the contents of user.js until you exit Firefox, launch it, exit again (at which point prefs.js will be updated), then launch Firefox once more and your changes are ready for use.

After the above steps are completed, you should be able to make XMLHttpRequest calls cross-site / cross-domain with your AJAX code without Firefox/Mozilla security getting in the way.

The bevy of user_pref settings above creates a new site security policy that allows the listed XML HTTP Request commands to be performed from “http://localhost.com:3000” to any address. Normally, Firefox will only allow XMLHTTP Request calls within the same domain. For example if you were on microserf.com domain, Firefox would not allow the website http://www.microserf.com to make XMLHTTPRequest calls to http://www.hackmehard.com since this was a major exploit that crackers would use to hide their evildoings in the background of apparently benign sites.

In general the security policy that Firefox has setup by default is a good idea. Setting up a new security policy as we have done above is generally safe as it only allows the site “http://localhost.com:3000” to make cross-site/cross-domain XMLHTTPRequest calls of any sort listed. Any other domain would not be allowed to use this site policy.

This post originally started out due to the desire to develop Salesforce.com AJAX Toolkit based s-controls outside of their Ajax Tools IDE (yeah, their naming schemes leave something to be desired), which runs on their Force.com “no software” platform.  Of course I ran into huge problems with Camino / Firefox and cross domain XMLHTTPRequest scripting security issues.  The result of which is this post on how to get around the cross site scripting issues and develop javascript based s-controls on your local machine, using your preferred IDE (go go Textmate).

Camino Fastest Browser on MacOk, it’s a bit early for me to be describing Camino as the Fastest and Best Browser on Mac OS X 10.5 Leopard, but at the same time I can’t help but be overjoyed at the prospect of having full keyboard navigation functionality (i.e. searching, finding, clicking/navigating/opening a link purely through the keyboard) with the blazing speed of a true Mac based browser.

It’s been only three days since I started using Safari 3.04 on my Macbook Pro, due to Firefox’s painfully slow performance (about 3-5 times as slow as Safari or Camino). That switch from Mozilla Firefox to Webkit Safari was not all cookies and cake though. Along with that change I lost the ability to navigate links with search / Enter key combinations, i.e. find links through the search function, which automatically highlights the link and then open them by hitting Escape then Enter. When you’re constantly using web pages with hundreds of links like many programming language documentation sites have, full keyboard navigation of pages and links is pretty powerful.

Here are some more reasons why Camino is the fastest and best browser for Mac OS X Leopard:

  1. Fastest Browser web page rendering

    Rendering is the fancy term of reading HTML page code (<tags>, javascript, stylesheets, etc.) and producing the beautiful, formatted text, layout and pictures in the browser window. One would think that the time it takes to read and display the same web page code on different browsers would be identical between all browsers. Interestingly… it is not. Safari 3.04 and Camino 1.53, the fast web browsers, are up to 6x faster in rendering the same web page when compard to Firefox or Internet Explorer. The best example that I have is within http://www.salesforce.com. I have no idea why these pages load so slow in Firefox, but they do. Sign up for a 30 day trial account (or a limitless developer account) and click through the various tabs on the account home (after logging in). Do this both in Firefox and within Camino, performing the exact same actions. In Firefox, at least for me, it renders the exact same pages but 3-4x slower. When you’re repeating the same actions over and over again (as is common in SalesForce.com) waiting 6-8 seconds for the same page to render is painful.

  2. Block Ads

    You heard me right: the ability to prevent/block/stop hyper annoying flash video ads from auto-playing and looping forever, which takes up tons of CPU processing power and can make your computer run like a slug… just to show a bloody ad. Stop Video Ads from playing while BrowsingThe worst part about flash advertisements is that you have zero control over it. At least on a television you can mute the volume (or speed/skip through it if you’re on Tivo or ReplayTV), but on a web page you’re forced to let it loop through it’s content for as long as you’re on the page. To set this up goto the top menu bar, select Camino, Preferences, Web Features, then check Block Flash Animations. After this, load up a page you know has flash ads such as CityVox.fr and reload it a few times until you see a blank white box with a stylized “F” representing the now muted Flash ad. Camino… je t’aime. This doesn’t mean that sites that normally have videos are now useless as you can still watch the videos by simply clicking on the box containing the Flash symbols to start playing the video. But, it’s an incredible relief to have the power and ability to control my own browsing experience.

  3. Keyboard navigation

    Find links on web pages using inline search (find as you type) and open/navigate them by hitting the Enter button. This is more of a power-user feature, but it’s quite a big feature for those who know about it. Within Camino, when viewing a web page, if you see a link you want to click on (or you happen know the name of the link, often the case when reading documentation), hit the “single quote” key (‘) or “forward slash” (/), which turns on “find as you type” search and start typing the word that you are looking for. Using “single quote” will find links only, whereas “forward slash” will search all text. Camino will move the cursor to the word that matches the letters that you are typing and at any time you can hit Enter to navigate/open that link. Need to move to the next matching link? Hit Command + g (the normal “Find Next” hotkey for Mac). Previous match? Hit Shift + Command + g. This is much much faster than scrolling down a web page and moving your mouse pointer to hover over the link then clicking it. Try it and you’ll understand why I think this is such a big feature. Although, if you’re not exactly Speedy Gonzales on the keyboard, this may not be a big draw. For those who are wise in the ways of Keyboard-Fu… rejoice.

Share this:       

Fastest Browser - SafariSo something that came as a bit of a surprise to me was that on certain sites, Safari is 4-5x faster than Firefox on page rendering.  Recently I’ve been doing lots of work on SalesForce.com and I was thinking: “Man, their site is hella slow”.

 After talking with a friend in Paris accessing the same site, but without all the slow loading issues I decided to give Safari on Leopard a try. The exact same pages, the exact same actions produced very different results.  Safari is by far the “fast browser” and Firefox, the slow browser, at least on OS X.  Pages that I would have to wait between 6-7 seconds to finish loading in Firefox would come up around the 1 second mark (or less) in Safari.  This is an enormous difference when you’re talking about browsing as 5-10 seconds is an eternity to wait for something to load, but too short of a time to do anything meaningful besides becoming frustrated.

Now if only Safari could navigate links using the keyboard only like it’s possible in Firefox.  In Firefox you can simply Ctrl + F to do a word search on the page (which is part of a link), when the partial word/link is highlighted, hit Esc to clear the search highlighting and you’re left with a cursor focused link that will respond to an Enter button press with opening the link.  Brilliantly fast, much faster than finding links through the mouse. Somehow we need to generate enough noise so that the Webkit (which is the basis of Safari) developers to take note and build this into the next release of their software.