?
Solved

20 second delay for page loading

Posted on 2010-08-17
8
Medium Priority
?
696 Views
Last Modified: 2013-11-11
Is there any frontend component (Dojo or javascript) which holds the page to wait for loading for around 20 seconds. I am right now using Dojo with my jsp. help is appreciated
0
Comment
Question by:vinodWebDev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 15

Expert Comment

by:SRigney
ID: 33459622
nothing officially waits to load the page, but the front end does have to load the html before it can display, having large scripts can slow the loading of a page.

Firebug for firefox, or the developer tools for IE8 and Chrome can show you what is loading when to let you see how long things take.  

Also ySlow is a plugin for Firebug in Firefox that analyzes your page to let you know why it's slow.  I like this one better than some of the other tools out there because it works behind a firewall.
0
 
LVL 5

Expert Comment

by:KiasChaos83
ID: 33459879
You could use jquery.


var $htmlChildren = $('html').children();
$htmlChildren .remove();
setTimeout(function() { $('html').append }, 20000);

Open in new window

0
 
LVL 5

Expert Comment

by:KiasChaos83
ID: 33459928
Probably should be the below.. since the above is not complete


$(document).ready(function(){
    var $htmlChildren = $('html').children().remove();
    setTimeout(function() { $('html').append($htmlChildren); }, 20000);
});

Open in new window

0
Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

 

Author Comment

by:vinodWebDev
ID: 33460505
@KiasChaos thanks for the solution. but is there any other way to get this done using plain java script .. or any other ajax frameworks such as Dojo or DWR
0
 
LVL 15

Expert Comment

by:SRigney
ID: 33460837
I misunderstood, are you trying to prevent the page for loading for a certain amount of time?  Do you mind if I ask why?
0
 
LVL 5

Expert Comment

by:KiasChaos83
ID: 33461226
Hi there,

This seems to do it.


dojo.ready(function() {
    dojo.require("dojo.NodeList-traverse")
    var html = dojo.query('html').children();
    html.style({display:'none'});
    setTimeout(function() { html.style({display:''}); }, 5000);
});

Open in new window

0
 
LVL 5

Accepted Solution

by:
KiasChaos83 earned 2000 total points
ID: 33461229
dojo.ready(function() {
    dojo.require("dojo.NodeList-traverse")
    var html = dojo.query('html').children();
    html.style({display:'none'});
    setTimeout(function() { html.style({display:''}); }, 20000);
});
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 33473456
you do it in back end that means .. in java .
Your thread for some time .
if u use forntend means othe function will excute before what ur function excute .
0

Featured Post

TCP/IP Network Protocol Cheat Sheet

TCP/IP is a set of network protocols which is best known for connecting the machines that make up the Internet. The truth is that TCP/IP is one of the oldest network protocols and its survival is mainly based on its simplicity and universality.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question