Header Banner
gadgethacks.mark.png
Gadget Hacks Shop Apple Guides Android Guides iPhone Guides Mac Guides Pixel Guides Samsung Guides Tweaks & Hacks Privacy & Security Productivity Hacks Movies & TV Smartphone Gaming Music & Audio Travel Tips Videography Tips Chat Apps
Home
Internet

How to Load Scripts Faster on Your Webpage

Feb 7, 2013 09:46 PM
Feb 9, 2013 06:29 PM
Car tachometer displaying RPM with a focus on high range.

This may be an old trick, but it is still very useful. Head.js proudly proclaims that it is the only script you need in your head. You can use it to parallel load all your scripts. This is much faster than loading them one by one.

Download Head.js

It can be found at http://headjs.com. Save it to the same directory as the html file your working on is saved.

Add This Between Your Head Tags!

Add This Between Your Script Tags.

head.js("file1.js", "file2.js", "file3.js");

Except replace the file names with the names of your js files.

So Far It Should Look Like This:



Style Sheets

If you are planning to link any external style sheets. Make sure you put it before script src. Otherwise it wont work, I had to learn this the hard way.

Enjoy.

You should notice a considerable change in your sites performance. Other guides to speed up your site will be coming soon.

Image from Photobucket

The next big software update for iPhone is coming sometime in April and will include a Food section in Apple News+, an easy-to-miss new Ambient Music app, Priority Notifications thanks to Apple Intelligence, and updates to apps like Mail, Photos, Podcasts, and Safari. See what else is coming to your iPhone with the iOS 18.4 update.

Related Articles

Comments

No Comments Exist

Be the first, drop a comment!