Monday, April 25, 2011

sIFR load before rest of page?

Hiya,

Is it possible to have sIFR "preload" or load before the rest of the page content? At present it is the last thing to load (due to the text position) and as it's quite an obvious part of the page I get a huge mash-up of text replacement all in a quick flurry which is not very appealing.

It looks like the site is having an epileptic fit. Once loaded, all is fine though :)

Any work-arounds to the load-fitting?

Cheers Hugh

From stackoverflow
  • If I understand the way sIFR works, you need to have created the heading in the DOM before attempting to change it. To be honest, every site I've been to that uses sIFR has that slight flip on loading.

    The answer then in my opinion, is no. I stand under correction though.

    hfidgen : I don't mind the way the text is replaced per se, but i'd just like to have it replaced all in one go rather than word by word, movie by movie. It creates quite a nasty effect. I've experimented with hiding the html text on page load, but you still get "flicker" as all the movies are rendered.
    Raithlin : Have you experimented with the various different libraries that implement sIFR?
    hfidgen : No, not yet actually- I just chose the latest build. Is there an appreciable difference in the way they operate?
    Raithlin : Ha, therein lies the dilemma. I'm not sure, but there are a few different approaches out there. Perhaps one might work better for you.
  • There are a two separate issues here:

    1. Replacing the elements as soon as possible
    2. Making the replacement as painless as possible

    For #1, sIFR by default replaces the elements on document load. However, to make this work in Safari, check out http://wiki.novemberborn.net/sifr3/DetectingCSSLoad.

    For #2, the problem, depending on the font used in Flash, is that the dimensions of the text are different from the HTML text. Check out http://wiki.novemberborn.net/sifr3/Ratio+Calculation to help lessen vertical jumpiness. You may need to tune the letter-spacing of the HTML text to lessen horizontal jumpiness.

    hfidgen : Hmm I can't get it working - the stutter/jitter bug is still too marked. I think the problem is that there are so many different font sizes in the tag cloud that it's extremely hard to adjust it all to fit properly, if I take the "tunes" out, it's even worse. I'll keep playing though ^^
    Mark Wubben : sIFR in a tag cloud? Sounds like a bad idea…

0 comments:

Post a Comment