Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

window.load or document.ready?

Ads
banner
banner
destroyer Offline referral

Posts: 430
Joined: Jul 2013
Reputation: 3

#1
Senior Member
I know that window.load will wait for everything on the page to load like images, iframes atc and then it will run. And document.ready will wait for the page to load completely and then run.

Now which one should I use to reduce time load on social share buttons?
josephinek Offline referral

Posts: 79
Joined: Jan 2015
Reputation: 0

#2
Member
I think window.load .
marcus_avrelius Offline referral

Posts: 2,519
Joined: May 2013
Reputation: 102

#3
Support Team
You should use window.load as it will run only after everything is loaded inducing DOM (Document Object Model).

document.ready in many cases can run before DOM slowing the site down!
Rapidsoft technologies Offline referral

Posts: 224
Joined: Sep 2015
Reputation: 1

#4
Member
window.onload : A normal JavaScript event.

document.ready : An specific jQuery event when the entire HTML have been loaded.
kavinsac Offline referral

Posts: 16
Joined: Oct 2015
Reputation: 0

#5
Junior Member
(07-13-2015 02:11 PM)destroyer Wrote:  I know that window.load will wait for everything on the page to load like images, iframes atc and then it will run. And document.ready will wait for the page to load completely and then run.

Now which one should I use to reduce time load on social share buttons?

Use document.ready which is run before the page loads completely...
damponting44 Offline referral

Posts: 408
Joined: Oct 2016
Reputation: 0

#6
Senior Member
The prepared occasion happens after the HTML report has been stacked, while the onload occasion happens later, when all substance (e.g. pictures) additionally has been stacked. The onload occasion is a standard occasion in the DOM, while the prepared occasion is particular to jQuery.





User(s) browsing this thread: 1 Guest(s)