Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Page only loads correctly once in IE, incorrectly once in FF

    I am working with using Javascript to create a page that scales and keeps its aspect ratio (much like a Flash page would). After a lot of trial and error, I have a prototype up with a couple of problems.

    It loads correctly once in I.E. Reloading, or opening a new browser, will also load the page correctly. But visiting a different page and coming back causes the width attributes to break. This happens with the non-aspect-ratio version in pure HTML also, but I was hoping that this problem would be solved by establishing values based on javascript variables.

    As for Firefox, the problem is more or less exactly the opposite. The page loads up all wonky the first time, and a reload or resize will fix it for every time afterward.

    To see what I'm talking about, you can take a look at
    http://www.jonesmfgmusic.com/testpag...lem_width.html

    For the HTML only version, see
    http://www.jonesmfgmusic.com/testpag...blem_html.html

    I'm guessing this is something to do with the order in which the data is loaded, so that once the information is all cached, it stops functioning in IE, and starts functioning in FF... can anyone confirm whether I'm on the right track with that, or how to fix it if I am?

    I'm most concerned by the fact that the width attribute is behaving as it does in IE. That looks like some kind of Microsoft bug to me, and I need a way around it. As for Firefox, I am guessing if I can just get it to load all of the correct information ahead of time, the page should come up correctly, but I just can't think how to do that.

  • #2
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Incidentally, I've had some people say that they can't see the problem.

    "Reload" doesn't cause a problem, while sometimes closing and reopening the browser does.

    To see the functionality break down, please look at

    http://www.jonesmfgmusic.com/testpag...m_width_l.html

    click on "LINK", and then "Go Back" from the new page.

  • #3
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Possible Solution

    I know this is an old thread but want to post a possible answer for anyone googling for it.

    I had a page which similarly wasn't loading correctly in FireFox the first time, but would after reloading. As OP suggested it did have something to do with caching --- I was defining background images for :before and :after psuedoclasses (of divs) in css, and the problem was that the browser (due to a a bug I'd imagine) was finalizing the layout before loading the images (whose size affects the positioning of other elements).

    The trick was to preload the images with javascript, as in:

    Code:
    <script type="text/javascript">
    var theImage=new Image();
    theImage.src="mypicture.jpg";
    </script>
    Last edited by yeoldedude; 02-16-2010 at 04:32 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •