We have a lot of ways to get the time for loading JavaScript and DOM on web pages; and this JavaScript article presents one of methods that use jQuery to do this; that's jQTester.
Please go to the full post for the download address and the guide to setup it.
- Demo
- Enlarge
- Reload
- New window
Free iPage Web Hosting for First Year NOW
If you're still looking for a reliable web host provider with affordable rates, why you don't take a little of time to try iPage, only with $1.89/month, included $500+ Free Extra Credits for the payment of 24 months ($45)?
Over 1,000,000+ existisng customers can not be wrong, definitely you're not, too! More important, when you register the web hosting at iPage through our link, we're going to be happy for resending a full refund to you. That's awesome! You should try iPage web hosting for FREE now! And contact us for anything you need to know about iPage.
So I have been trying to figure out a really simple, easy way to test the load times of my Javascript in the page, and have ended up creating a simple load time tester using jQuery called jQTester.
This assumes you are using jQuery, and are running using version 1.3.1 - however it should work on most versions as the jQuery I am using is pretty lightweight.
The concept is simple - you have 2 files called start.js and end.js. Place start.js at the top, just after your <HEAD> tag, and place end.js just before </body>. Using javascript timers I am capturing the length of time between start.js loading, and the document.ready jQuery function running (when, all javascript and DOM elements should be loaded and ready to use).
Why place end.js before </body> ?
So, ideally you are placing your javascript calls at the end of the HTML document. Why? because javascript file downloads block parallel downloads in the browser. Browsers can only download 2 files per hostname at any one time, so by placing them in the <HEAD> you are in theory stopping anything else from loading within the page whilst all your javascript is being loaded. By placing them at the end of the HTML document, images etc have the chance to load first, so the perception for the user is faster load times.
So the browser will load your HTML document top to bottom. Based on the assumption that no other javascript needs to load after </body> is called, the best place to stop the timer is at that last point. That's when the clock stops, and we assume we're all loaded.
jQTester 0.1
So I'm not really 100% sure if this is the right way to go about this, but anyway - I've packaged this up as "jQTester" and am attaching version 0.1 for your perusal. It would be good to get some feedback on how I can move forward with this, as I am keen to develop a tool or plugin that can sit within the page code, rather than being a browser add-on etc.
Install instructions: Use jQuery, place start.js after the <head> tag and place end.js before the </body> tag.
- Sent (0)
- New
Generate your business videos by AI with voice or just text
chatGPTaz.com
Talk to ChatGPT by your mother language
AppAIVideo
Your first FREE AI Video App
Deepfake Video
Deepfake AI Video Maker
Deepfake
Deepfake AI Video Maker
AI Deep Fake
Deepfake AI Video Maker
AIvidio
AI Video Mobile Solutions
AIvideos
AI Video Platform & Solutions
AIvedio
AI Video App Maker
Faceswap AI Online
Swap Faces Video, Photo & GIFs Instantly with Powerful AI Tools - Faceswap AI Online FREE
Faceswap AI Online
Swap Faces Video, Photo & GIFs Instantly with Powerful AI Tools - Faceswap AI Online FREE
Temu Free $500 for New Users
Claim Free Temu $500 Credit via Affiliate & Influencer Program
Free TikTok Ads Credit
Master TikTok Ads for Your Business Marketing
Dall-E-OpenAI.com
Generate creative images automatically with AI
chatGPT4.win
Talk to ChatGPT by your mother language
First AI Product from Elon Musk - Grok/UN.com
Speak to Grok AI Chatbot with Your Language
Tooly.win
Open tool hub for free to use by any one for every one with hundreds of tools
GateIO.gomymobi.com
Free Airdrops to Claim, Share Up to $150,000 per Project
iPhoneKer.com
Save up to 630$ when buy new iPhone 16
Buy Tesla Optimus Robot
Order Your Tesla Bot: Optimus Gen 2 Robot Today for less than $20k