RSS

Category Archives: firefox

Keep Your (Webmail?) Session Open

If you have a website that keeps expiring your session after a while, and you want to work around that, then try out the SessionAlive extension for Firefox. I find it extremely useful, especially for webmail (such as Microsoft Outlook Web Access).

The extension works OK in Firefox 3.6.

 
Leave a comment

Posted by on 17 February 2010 in extension, firefox, sessionalive, webmail

 

Prefetching Files Using jQuery

>Since years, Gecko-based browsers have supported link prefetching, while other browsers (notably Internet Explorer) are lacking this function.

Here’s a simple JavaScript-based work-around based on jQuery:

$(document).ready(function() {

// Prefetch all files referenced in [LINK rel="prefetch" href="xyz"] tags...
var $prefetchTags = $('HEAD LINK[rel=prefetch][href]');

// ...starting with the ones that can be done asynchronously via AJAX...
$prefetchTags.filter('[href$=.txt],[href$=.js],[href$=.html]')
.each(function() {
$.ajax({url: this.href, dataType: 'text'});
});

// ...followed by all referenced images,
$prefetchTags.filter('[href$=.png],[href$=.jpg],[href$=.jpeg],[href$=.gif]')
.each(function() {
new Image().src = this.href;
});

It looks for all LINK tags in the HEAD section of the HTML document that have rel="prefetch" set.

Then it processes all HREF attributes, but treating text files and images differently, since text files can easily be downloaded using asynchronous HTTP requests (a.k.a. XMLHttpRequest or AJAX), while this method is not well-suited for fetching binary files.

This approach may be a bit rough on the edges, since I’ve only done limited testing, on Fireefox 3.0/Mac and MSIE 8.0/WinXP.

 

Firefox 3.5 Released

>If you didn’t know already, Firefox 3.5 was released today (June 30, 2009).

Of course, the PensioenPage technology is ready for it, even detecting the version properly, check out the source code:

www.pensioenpage.com/?_indent=true

Note that the _indent=true enables indentation in the source code.

 
Leave a comment

Posted by on 30 June 2009 in firefox, firefox3, firefox3.5

 

Favourite Browser Features

>Here’s an overview of what I appreciate in a browser. This table only considers browsers available on Mac OS X, since that’s my desktop environment. Note that most of this is very subjective, it’s just my personal preferences.

In Firefox, I’ve installed the following add-ons:

  • Web Developer
  • Firebug
  • Google Page Speed

The bold items are my favourites.

Firefox 3.0 Safari 4.0 Opera 10 (beta)
Startup time Pretty bad Very good Very good
Ability to immediately edit the address in the address bar after startup OK Bad: there is a delay OK
Shows plain XML in a nice tree Yes No Yes
Recognizes a port number, even when no protocol (e.g. “http”) is specified Yes Yes Yes
OS X look-and-feel Nice Nice Not very nice
New tab page Fast, but empty Top sites: useful and very attractive Speed dial, quite nice
Search Google from address bar Yes No Yes
Find in page Toolbar at bottom is OK, but far from optimal Result highlighting: very nice and polished Bad: separate dialog window
Progress of downloads visible in OS (e.g. in Stacks) No Yes No
Web development tools Combination of Firebug, Web Developer and Google Page Speed works like a charm “Inspect Element” is very nice and integrated Developer tool is not very intuitive
Login form autocompletion Excellent, supporting multiple accounts OK OK
Browser can be configured to have just one window with tabs, even when a link is pressed in an external application Yes Yes Yes
Link targets can show in a tooltip (e.g. at the window bottom, like Google Chrome) and do not require a status bar to display No No No
Activity monitor No Yes No
Number of clicks in the address bar needed to select all text One Three One
Prompt to store login details Unobtrusive and non-blocking bar at the top Blocking dialog window (very bad) Obtrusive dialog window, but non-blocking
Supported by XMarks Yes Officially only Safari 3 is supported, but in practice it works with version 4 No

Updated on June 9, 2009, for Safari 4 final release and Opera 10.00 beta. Updated and added criteria.

 
Leave a comment

Posted by on 21 April 2009 in firefox, opera, safari

 

Firefox Usage Up To 20%

>NetApps has provided some statistics regarding browser usage. According to their report:

Firefox usage is still climbing and now almost at 20%, while Internet Explorer usage is still decreasing and now down to just above 71%.

Of course, your mileage may vary, depending on the kind of site, your geographical location, etc.

But it is becoming more and more obvious that web developers programming Internet sites to Internet Explorer only are irresponsible and are causing issues for their employers and for the visitors of the sites.

An approach that works very well:

  • program to web standards, avoid JavaScript and Flash initially;
  • add JavaScript support to make things look better or work nicer (without disrupting the functionality for user agents without JavaScript);
  • add some Flash if you must, but have replacement content in case Flash is unavailable;

Benefits:

  • standards compliance;
  • accessibility for visually impaired is likely to be easy to achieve;
  • the same applies to Search Engine Optimization.
 

Ellipsis in all Modern Browsers (Updated x5)

When you want to avoid that text in a web page wraps, you can use:

   overflow:hidden

However, it’s nice to show to users that some content is actually missing. This is typically done with an ellipsis character, that is displayed as three dots:

   ...

Getting this working across all modern browsers has always been a pain in the neck, but there is an easy solution a hack that works around the issue, to a certain extent. Note that Firefox 4 is not supported and neither will Firefox 5 be. Howevere

First, make sure you have a small ellipsis-xbl.xml file on your web server that is served with the content type text/xml, with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<bindings xmlns="http://www.mozilla.org/xbl" xmlns:xbl="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="ellipsis">
   <content>
      <xul:window>
         <xul:description crop="end" xbl:inherits="value=xbl:text"><children/></xul:description>
      </xul:window>
   </content>
</binding>
</bindings>

Then mark all HTML elements you would like to show the ellipsis character on overflow with the class Ellipsis, e.g.:

   <div id="BreadCrumbs" class="ShyText Ellipsis">

Then add the following to your CSS:

   .Ellipsis {
      text-overflow:ellipsis;
      -o-text-overflow:ellipsis;
      -ms-text-overflow:ellipsis;
      -moz-binding:url(/ellipsis-xbl.xml#ellipsis)
}

Elaboration:

text-overflow
for WebKit-based browsers (Safari, Chrome, etc.) and for Internet Explorer 7 and before;
-o-text-overflow
for Opera;
-ms-text-overflow
for Internet Explorer 8 and 9;
-moz-binding
for Gecko 1.x-based browsers (Firefox 3.x or earlier, Camino, etc.)

Note that the text-overflow will be standardized as of the CSS 3 standard, which is currently still in draft. Firefox 6 may add support for it.

Credit for the Gecko solution go to Rikkert Koppes and William Khoe, see the article text-overflow: ellipsis for firefox.

Update (Oct. 22, 2008): The solution for Gecko-based browsers (Firefox, etc.) is far from perfect. The solution has at least the following issues:

  1. applying the .Ellipsis class to an inline element causes the element to disappear;
  2. in Firefox 3.0 (not in Firefox 2.0), soft hyphens inside .Ellipsis elements always show as dashes;
  3. text inside a .Ellipsis element can no longer be selected.

Update (August 11, 2009): Mozilla (in the person of Simon Montagu) is working on a solution, which may or may not go into Firefox 3.6/Gecko 1.9.2. Vote for bug 312156 if you think it’s important.

Update (August 13, 2009): Don’t expect the solution to go into Firefox 3.6/Gecko 1.9.2 (scheduled for release fall 2009), the bug has been tagged as “-wanted1.9.2” (starting with a minus-sign) meaning it’s not planned for the upcoming release. It may still go into Firefox 3.7, which is tentatively scheduled for release in 2010, see the Mozilla Project Meeting Minutes of July 20, 2009.

Update (August 24, 2009): Devon Govett provides a nice jQuery-based solution that at least allows you to resolve the issue when JavaScript is enabled. It works like a charm, at least on Firefox 3.5.2.

 
8 Comments

Posted by on 16 October 2008 in css, css3, ellipsis, firefox, gecko, mozilla, overflow, text-overflow

 

>PensioenPage supports Firefox 3.0

>As one of the first companies, we at PensioenPage are proud to announce we have confirmed compatibility with Firefox 3.0, mere hours after it’s release. Since we adhere to a standards-based approach, compatiblity is mostly out-of-the-box.