www.webdeveloper.com
Results 1 to 5 of 5

Thread: [RESOLVED] Page sticks on Loading

  1. #1
    Join Date
    Jun 2012
    Posts
    4

    resolved [RESOLVED] Page sticks on Loading

    Hi, I'm new to web development and have been given a task at work to build dynamic pages displaying internal system info on TV screens in a public area, so the environment is very specific - output to a large Flatpanel TV, browser is FireFox)

    I'm not sure if I'm posting to the right forum, so apologies in advance if I've picked the wrong one.

    The pages are specifically designed to be displayed at 1920x1080

    I have a problem with one of the pages.

    There is an ASP.NET element to the page, which on Page Load fetches some data from a database (recent visits by Field operatives to customers) and inserts it as array elements into a script element in the page header.

    On the client side there is some Javascript, run from onload in the body tag which reads the data from the array, writes the message into a DIV then moves the DIV across the page from a pre-defined start point to end point (then moves to the next item in the array and repeats the amination).

    Once the script has run through all the items in the array it reloads the page (using
    Code:
    window.location.href = strURL;
    as the command, where strURL is previously declared and assigned the URL of the page).

    The problem I have is that sometimes when the page reloads, it stops, having rendered the initial view of the page and the browser (FireFox) still shows 'Read <server>' in the status bar, and the javascript never starts.

    I've rebuilt the page from scratch and it still does the same. I've made a copy of the page and set each one to load the other at the end of the Javascript cycle. Neither of these has helped.

    I've got 3 screens doing basically the same thing (ASP gets data, Javascript displays it in an animated fashion, then reloads the page when it hits a specific trigger), and this is the only one that exhibits the issue.

    I've got access to the IIS logs for the server, and I see nothing unusual there (the request status shows as 200), although I don't really know much about interpreting them.

    Can anyone suggest anything I could look for to give me a clue as to what's causing this behaviour?

  2. #2
    Join Date
    Jun 2006
    Location
    Boston, MA
    Posts
    383
    install firebug http://getfirebug.com/. once installed open it at the bottom of the screen, click 'console', refresh the page, and see if there are any specific errors and relay them here.
    "Problems cannot be solved by the same level of thinking that created them.

  3. #3
    Join Date
    Jun 2012
    Posts
    4
    Thanks for that, I should have thought of installing firebug myself.

    The problem does not occur ever time the page loads, so i've left it to display overnight, should have encountered g the problem by the morning.

  4. #4
    Join Date
    Jun 2012
    Posts
    4
    Hi, Firebug did not pick up any errors when the problem recurred.

    However, watching the Net part of the console to see what the request & response headers looked like gave me an idea.

    The page referenced the same large (1920x1080) PNG image 13 times as background to various DIV elements.

    I had assumed that once the image had been retrieved from the server it would be kept as cache and only fetched again if the original image file changed. This appears not to be the case.

    I've eliminated that repeat reference and used smaller crops of the main image where it's not the actual background of the page, but is used in elements higher up the z-index (to give the illusion of text disappearing into the background), and it's been running for much longer than it used to take to lock up.

    I've also made the database query much more efficient, although I was convinced the ASP.NET part of the process was not the problem (the full HTML page would transfer, and could be inspected through the browser, and I've got other pages with queries that take much longer, and return much larger datasets that aren't a problem).

    If it runs OK over the weekend I'll close the thread off as resolved.

  5. #5
    Join Date
    Jun 2012
    Posts
    4
    The changes made appear to have worked around the problem.

    I'm assuming it's the multiple references to the image file that was the issue.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles