Delay in Firefox / Mac

148 views
Skip to first unread message

patte

unread,
Mar 25, 2009, 4:31:52 AM3/25/09
to cufón
Hi,

we have some strange delays with cufon and Firefox on Mac (fast
iMac) .

Everything works fine on Windows but the combination of osx with
Firefox 3.0.7 sometimes first showing the system font and with a
flicker delay the replaced cufon font.

We are using the first a:hover enabled version of cufon (19/3/09).

Perhaps I make a mistake using the YUI-compressed version and also
using the Minify PHP library to compress the whole JS serverside?
Would it be better to use the uncompressed version of cufon for using
with minify?

Or did someone have the same experience having a short delay showing
the replaced font on a Mac?

Thanks much!

patte

Jonah Fox

unread,
Mar 25, 2009, 5:00:07 AM3/25/09
to cu...@googlegroups.com
Is it possible to use text-align: -9999em to hide the normal fonts offscreen ?
At least this way - you don't get the switch between the fonts.

Michiel Sikma

unread,
Mar 25, 2009, 5:06:11 AM3/25/09
to cu...@googlegroups.com

I would advise against such a hack, since there shouldn't be a delay at all. It can be caused by anything, though, but it shouldn't be Cufón's doing. Maybe you're loading some JS file from a different domain? It would be most helpful if you could upload the page so we can have a look.

In my experience, having a non-minified or differently compressed JS files shouldn't impact performance by *that* much.

Michiel

Jonah Fox

unread,
Mar 25, 2009, 5:11:16 AM3/25/09
to cu...@googlegroups.com
I just found this :

http://wiki.github.com/sorccu/cufon/usage

Step 4 – Making Internet Explorer behave

Unfortunately one problem remains with Internet Explorer. In most cases, there is a short but visible delay before the text is replaced. You can avoid this issue by inserting the following snippet right before the closing </body> tag (or before any external scripts such as Google Analytics):

<script type="text/javascript"> Cufon.now(); </script>

And the delay is gone.

Note: This step will hopefully become obsolete in the future.

Michiel Sikma

unread,
Mar 25, 2009, 5:14:47 AM3/25/09
to cu...@googlegroups.com
The problem at hand is related to Firefox on Mac OS X, not Internet Explorer. :)

Michiel

patte

unread,
Mar 25, 2009, 5:20:08 AM3/25/09
to cufón
Hi Michiel,

hopefully the website goes online the next days. Meanwhile I am trying
to test the whole thing with different configurations using/not using
minify for js and css compression. There is a lot jquery code and
plugins i want to reduce in file size.....

But, in general cufon works great. The delay i mentioned did not
appear every time the page loads on FF/Mac - only sometimes. Perhaps I
have a broken image src within some of that js.

patte



On 25 Mrz., 10:06, Michiel Sikma <mich...@sikma.org> wrote:
> I would advise against such a hack, since there shouldn't be a delay  
> at all. It can be caused by anything, though, but it shouldn't be  
> Cufón's doing. Maybe you're loading some JS file from a different  
> domain? It would be most helpful if you could upload the page so we  
> can have a look.
>
> In my experience, having a non-minified or differently compressed JS  
> files shouldn't impact performance by *that* much.
>
> Michiel
>
> On Mar 25, 2009, at 10:00 AM, Jonah Fox wrote:
>
> > Is it possible to use text-align: -9999em to hide the normal fonts  
> > offscreen ?
> > At least this way - you don't get the switch between the fonts.
>
> > On Wed, Mar 25, 2009 at 8:31 AM, patte <patrick.ehrl...@ehrlich-werben.com

Simo Kinnunen

unread,
Mar 25, 2009, 5:21:40 AM3/25/09
to cu...@googlegroups.com
Hi patte,

Could it be that you are including your stylesheets after cufón? Like
this:

<script type="text/javascript" src="cufon-yui.js"></script>
<script type="text/javascript" src="Frutiger_LT_Std.font.js"></script>
<link rel="stylesheet" type="text/css" href="style.css" />

You should always load the stylesheets first, like this:

<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="cufon-yui.js"></script>
<script type="text/javascript" src="Frutiger_LT_Std.font.js"></script>

If that doesn't help, I'm going to have to ask for an online example.

Simo

Simo Kinnunen

unread,
Mar 25, 2009, 5:39:30 AM3/25/09
to cu...@googlegroups.com
Hi Jonah, Michiel,

The heading is actually a bit misleading, it also applies to other browsers if you're using Google Analytics or any other external scripts at the bottom of your page. This will result in the page being rendered while the external scripts load and execute, but the document won't be "finished" until the scripts are ready. This is actually a more likely cause for the delay than the CSS thing.

So basically you should place Cufon.now() at the bottom of your page, but before any external scripts, just like it says in Step 4.

Simo
Reply all
Reply to author
Forward
0 new messages