Cosmetic defect on many Smugmug sites

jfriendjfriend Registered Users Posts: 8,097 Major grins
edited February 12, 2011 in Bug Reporting
When using Firefox 3.6 and viewing the http://www.moonriverphotography.com site and many, many other sites, there is a visible artifact when the site loads. It's a flash of a white box, usually near the lower left of the window. It shows briefly and then goes away (perhaps 1/4 second or something like that). I don't see the flash in IE or Safari, but I always see it in Firefox. I only see it on some sites. I always see it on the moonriver site and I've seen it recently on dozens of other Smugmug sites so I don't think it's specific to any particular customization.

I believe the issue is caused by the cookieMonsterIframe object which is something that is injected into many/all sites (you can see it nearly the end of View/Source of the moonriver homepage).

I think a work-around to make the flash not show is to add this CSS:

#cookieMonsterIframe{visibility: hidden;}

This particular object is added to the page with this code:
YAHOO.util.Event.onDOMReady(function() {
    var body= document.getElementsByTagName('body')[0];
    var iframe = document.createElement('iframe');
    iframe.id = 'cookieMonsterIframe';
    iframe.src = 'http://www.smugmug.com/include/js/cookiemonster.mg?returnTo=http://www.moonriverphotography.com';
    body.appendChild(iframe);
    YAHOO.util.Dom.addClass('cookieMonsterIframe','yui-hidden');
});

I wonder if the problem is that the "yui-hidden" class is added right after it's appended into the document rather than before so there can be a brief moment when it's visible.

I don't have this code in my site, so I'm wondering if this code is only injected into the page for custom domains.

I've seen this on many sites and many different pages. For example, it seems particularly visible on this page in a different site:

http://www.tonyandjason.com/Other/Guestbook/15735642_jGeFq#1179587371_wbaGb

FWIW, I think this issue has been here for a long time as I've seen it occasionally for a long time. It doesn't happen on my site and I just never bothered to try to figure out what it was before now. I suspect the visibility of the issue depends on browser implementation and timing of redraws when objects are added to the page. Perhaps it's worse in the latest version of Firefox.
--John
HomepagePopular
JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
Always include a link to your site when posting a question

Comments

  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited February 9, 2011
    Bump. Does anyone care that there's a flashing white box on every Smugmug site with a custom domain on it?

    It's trivial to reproduce and see. I've given you examples, including Andy's own site.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • docwalkerdocwalker Registered Users Posts: 1,867 SmugMug Employee
    edited February 10, 2011
    John,

    Yes I do care but I was off yesterday and did not get a chance to reply. I am not seeing this flash that you describe on Andy's or the other site you mention using FF. Andy has also sent this to the programmer so that they can take a look.

    --Doc
    SmugMug Support Hero
    http://help.smugmug.com
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited February 11, 2011
    docwalker wrote: »
    John,

    Yes I do care but I was off yesterday and did not get a chance to reply. I am not seeing this flash that you describe on Andy's or the other site you mention using FF. Andy has also sent this to the programmer so that they can take a look.

    --Doc
    Doc, can you still not see it? I see it on hundreds of Smugmug sites and the fix is trivial.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • RogersDARogersDA Registered Users Posts: 3,502 Major grins
    edited February 11, 2011
    It's been an issue for a long time.

    http://www.dgrin.com/showthread.php?t=161501
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited February 11, 2011
    RogersDA wrote: »
    It's been an issue for a long time.

    http://www.dgrin.com/showthread.php?t=161501
    Yep - I posted a similar analysis in that thread too. Apparently, nobody at Smugmug sees it (probably because they all use Macs) or I assume they'd be all over fixing it (especially since it's a one line fix) because it's a real boober of a cosmetic defect (though transient) on a site who's purpose is to look great.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited February 11, 2011
    jfriend wrote: »
    (probably because they all use Macs)
    Haha. We love our Macs. But we have a big viewership that uses windows so we all have it. I run Windows 7 & IE8, Windows 7 & IE9, Windows Vista and IE7, and Windows XP & IE6. Of course each of those installs has also Firefox and Chrome and even Safari browsers on them as well.
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited February 11, 2011
    I've tried on my site (shift-reloaded a dozen times!) and can't see what you're describing (using Win7 and FF). Can you give me some sites that you see it on?
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited February 12, 2011
    Andy wrote: »
    I've tried on my site (shift-reloaded a dozen times!) and can't see what you're describing (using Win7 and FF). Can you give me some sites that you see it on?
    I think it happens only on custom domains. I linked another site in my first post here. I've seen it in hundreds of sites. We discussed the same issue 8 months ago. There's no reason for you to knock yourself out trying to reproduce it. The problem exists. Lots of us see it. The fix is trivial.

    If one of your sorcerers just looks at my first post here, they will see that the code is just being dumb and the object should be made invisible BEFORE it's added to the DOM, not after. The way it is now, there is a window of opportunity for it to be momentarily visible (depends upon browser implementation). If the site has a dark background, it can show briefly as a white outline of a square (won't be seen on a white background).

    Andy, you really don't have to waste time trying to reproduce this. If I had an easy way to capture a video of a page loading, I'd do that and show you because it happens every time on many sites, but I don't have a tool for that. Just have a sorcerer make the one line fix.

    FYI, I see the flash every time on your site. Slow your computer down and slow your network connection down and you're probably more likely to see it. I tend to see it more visibly when BackBlaze is busy uploading my latest backup data (right now it's chewing on 8GB of photos from today).
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited February 12, 2011
    Managed to grab a screen capture during loading:

    1184799285_WELQc-XL.jpg
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited February 12, 2011
    Thanks John, we'll see if we can fix that up!
Sign In or Register to comment.