jQWidgets Forums

jQuery UI Widgets Forums General Discussions Show animated gif on load script

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Show animated gif on load script #69556

    boxmga
    Participant

    Hi everybody…

    Loading many widgets in the same page increases the delay time between the page calling and their content display, because the calling for the widgets script is placed on the <head> section and the HTML parse will not show anything until finish the <head> section, loading all the external scripts call placed there.

    Usually, this lag is insignificant and almost unnoticeable by the user. But, here in Brazil, with our poor connections and slow transfer rates/surfing speeds, if you load more the 100 Kb in <head> section the user will notice the lag (like when browser window freeze).

    When I load some heavier widgets (like grid, datatable or chart), I can notice a significant delay when I’m under bad/poor connections.

    There is a belief that if your pages delay more than 2 second to load, user will get out.

    So, I aks if is there a way to show something (like a “loading” animated gif or a progress bar), to hold the user attention, while all scripts declared in head section loads?

    Show animated gif on load script #69560

    Peter Stoev
    Keymaster

    Hi boxmga,

    You can probably use Animated Gif image for that purpose and display it while your data is loading. There’s a nice site offering free gif images – http://www.ajaxload.info/

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Show animated gif on load script #69632

    boxmga
    Participant

    Yeah, but I only can use the Gif after HTML parse load the <body> section.

    In other hand, the scripts are loaded before this, in the <head> section.

    So, when I show the Gif, I already have had the lag.

    How can I show something when <head> section is loading?

    Show animated gif on load script #69633

    Peter Stoev
    Keymaster

    Hi boxmga,

    If your scripts are at the bottom of your page, HTML will be rendered first, then the scripts.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.