Posts Tagged ‘firefox’

“custom_domain is null” error message in Firefox

Thursday, July 9th, 2009

Problem: When opening a “localhost” address using Firefox, a JavaScript error message is displayed with the error message “current_domain is null”.

Description: Using Firefox version 3.0.11. Error message only appears when connecting to a site hosted on the local machine. Disabling all add-ons resolves the problem. Re-enabled add-ons one by one. Re-enabling LongURL Expander causes the problem to re-appear. Error message is known issue with version 2.0.0 of the add-on.

Solution: As per the comments on the the add-on page, edit the longurlmobileexpander.js file to make the requirement for the second part of the domain name optional.

  • On Mac OS X, open home folder and browse to Library/Application Support/Firefox/Profiles/[profile].default/extension/{a7101e54-830c-4d33-a3ed-bedc17ec44da}/content
  • Open longurlmobileexpander.js in TextEdit.
  • Edit line 78 to read:


var current_domain = document.location.href.match(/^https?:\/\/(?:www\.)?([^\.]+(\.[^\/]+)?)/i);

  • Save changes.

Thanks to Mathias Jansen for the solution.

Weird Bug – WordPress or Firefox to Blame?

Tuesday, July 22nd, 2008

I came across a weird bug when I was writing the previous post.

I use a Mac, (as if you didn’t know at this stage!), and on a Mac there’s a button in the top right hand corner of the application window that allows you to hide the Firefox toolbars. This is it:

Button to hide Firefox toolbars

Button to hide Firefox toolbars

I was in the middle of typing the post and wanted to get some idea of how the layout would work. So I command-clicked the “Preview this Post” link. Usually this would load the preview in a new tab. I do this all the time and have never had a problem. With the toolbars hidden, the WordPress saved a draft instead of opening the Preview. Strange.

In case I was going a bit mad, (which is also highly probable), I tested it in WordPress 2.3.3 – command-clicking the Preview link opened a new tab with the test post I wrote. I tried it on a local install of WordPress 2.6 and I encountered the same problem – command-click would cause WordPress to save a draft.

At first I thought that it may be a Firefox issue, because I tried replicating the problem in Camino, but that worked as expected. However, I’ve never had a problem with Firefox opening new tabs in this manner and ever other link on the page works as expected. Hmmm.

Using Safari to Add Digital Radio to the Dashboard

Thursday, July 3rd, 2008

While Firefox is my browser of choice, Safari does have one feature that makes it a great choice on a Mac – the ability to add webclips to the Dashboard.

I posted recently about RTE’s new digital radio stations that are now available on-line. Using Safari it’s now possible to load the radio station in your dashboard and have it available when you want it. Here’s how.

  • Open Safari and browse to the page containing the player for your preferred radio station.
  • Go to the File menu.
  • Open in Dashboard.
  • Move your mouse cursor over the player.
  • As you move over the player is should be highlighted.
  • Click on the area of the page that you want to save to the dashboard.
  • You’ll be prompted to adjust the size of the webclip.
  • Click the Add button at the top of the page.
  • The Dashboard will open with your webclip.
  • Position your mouse over the webclip and then click the i that appears in the bottom right hand corner.
  • Unclick the tick box that says “Only play audio in Dashboard”.
  • Click Done.
  • Click out of Dashboard.

Your digital radio station will now play in the background. When your finished listening, just go back into dashboard, and re-tick the “Only play audio in Dashboard” option and click Done. Exit Dashboard and your radio station will shut down.

On a slightly related note, Firefox have confirmed that they have been given the record for the most downloads in a single day by Guinness World Records. If you downloaded Firefox on that day, you can get a certificate with your name from Mozilla.

Ban target="_blank"

Wednesday, June 18th, 2008

Today was a free day for me so I spent it browsing the web, writing posts and just general faffing around. Spending so much time on the Net today prompted me to write about one of my pet hates – web sites that open new windows when you click on a link.

First a bit of technical background for those of you that don’t use HTML. If you know this stuff already, then feel free to skip this bit. A link is created in a web page by using the anchor tag. It looks like this:

<a href=”http://www.example.com”>link text</a>

Clicking on “link text” would bring the user to the web address specified in the href part of anchor tag. (In this www.example.com). In some cases developers want the page to open in a new browser window, in which case they write the anchor tag like this:

<a href=”http://www.example.com” target=”_blank”>link text</a>

Now when the user clicks the link, a new browser window is opened to display the web page specified. It’s the target=”_blank” part of the anchor that tells the browser to open a new page. The thinking behind using this type of behaviour is that the user is not forced to navigate away from the website that spawned the new window, thereby making it easier for them to return.

However in doing so, the web developer is removing control from the user. From a Human Usability point of view, loss of user control in this way is a Bad Thing. The user should always have full control of their browser window, and removing that control will actually lead to an increased risk that they will either move on elsewhere and not come back, or will be unable to find the original site that spawned the new window. That is, it’s easier to use the back button to browse back through your history then it is to find the one window out of ten that have been opened on your desktop.

In order to ensure that websites can be properly displayed by any browser, there is an industry body that provides standards for the various web languages. This body, the W3C, is currently working on a new standard for the most basic web language – HTML 5.0.

At the moment, the current standard is HTML 4.01. In the full specification of this standard, there is no place for the target=”_blank” attribute. It’s not allowed, and technically, including it in your website breaks the standard.

The reason we still so many links opening in new pages is that there is not just one version on the current HTML standard, there are actually 3:

  • HTML 4.01 Strict,
  • HTML 4.01 Transitional, and
  • HTML 4.01 Frameset.

Only the HTML 4.01 Strict version of the standard prohibits the use of the target=”_blank” attribute, so designers can still use it by telling the browser to use one of the other standard versions. (How this is done is a bit beyond what I’m trying to get at, but suffice to say that each page on a website has to contain a Document Type Declaration which names the version of the standard being used.)

Even if the web developer specifies the HTML 4.01 Strict version and uses the target=”_blank” attribute, the browser will still open the link in a new window? Why? Because the browser doesn’t have to follow the specifications. It is up to the browser to implement the specification as it sees fit, and to try and interpret the web developers intentions as best it can. This means that although a page may not comply with the specifications, it will still display and work as intended.

This type of behaviour is not going to change any time soon. No browser is going to go down the route of refusing to display a website because it doesn’t exactly comply with the W3C standards. Few enough web developers care about these standards, and even fewer Internet users are aware that they exist. In fact, you’d be surprised how badly most of the the W3C standards are implemented in modern browsers.

So where do we go from here? As I said before, the W3C are currently working on HTML 5.0, but that in itself is not going to stop web developers from opening new windows. Even if browsers ceased supporting the target=”_blank” attribute, there are other ways to open a new browser window using scripting.

One possible solution is that the browser developers recognise that this is a bug-bear for some people and add an option to disable this behaviour within the browser. One setting that allows the end user to decide how these type of links should be handled. Thankfully with Firefox it is possible to do this, though it does require a bit of manual editing of the Firefox preferences. Here’s how:

  • Open a new tab, and in the address bar type about:config and hit enter.
  • In the filter bar, type browser.link, you should be left with 3 settings:
    • browser.link.open_external
    • browser.link.open_newwindow
    • browser.link.open_newwindow.restriction
  • Double click each one in turn and set the values as follows:
    • browser.link.open_external: 3
    • browser.link.open_newwindow: 3
    • browser.link.open_newwindow.restriction: 2

The changes should take effect straight away. This won’t completly solve the problem, as new windows will now open in new tabs instead, but at least they’ll all be contained within the same browser window.

You can test whether it works for you or not by clicking this link: Google in a new window

Firefox Download Day

Tuesday, June 17th, 2008

Firefox 3.0 is released today. Mozilla want to set a record for the most downloads in a day. All well and good, but for some strange reason when I go to download it, all I get is a download link for Firefox 2.0.0.14. Hmmm.

Thanks to Michele, I managed to grab it off the Mozilla FTP server.

Data Leak Bug in Firefox

Thursday, January 24th, 2008

Mozilla have confirmed that there’s a bug in Firefox that could lead to your private data being exposed. The security people at Mozilla have rated this security issue as low and are working on a fix.

The bug involves how Firefox deals with “chrome://” URI’s and escaped characters. The full technical details and a demo of the bug are available from Gerry Eisenhaur’s hiredhacker site. The demo seems to be for Windows only, so those of a Mac or Linux persuasion will have to wait to see if this bug affects them.

Until a fix is released, the NoScript add-on can be used to stop this bug in it’s tracks.

New WMP Plugin for Firefox

Tuesday, April 17th, 2007

Microsoft have just released a new Windows Media Player plugin for their greatest competitor in the new browser wars – FireFox. The new plugin resolves several problems with the older plugin that would crash Firefox.

The plugin is available for Windows XP and Vista only, though it would be nice if they released it for other platforms, but I don’t see that happening any time soon.

The plugin can be downloaded from the Microsoft Port 25 website.