Comments (3)
Scripts loaded in the head are downloaded asynchronously of each other before the page loads, while scripts in the footer are downloaded in sequence after the rest of the page is loaded. The difference is that when you load in the head, your net page load time is faster.
The only good time to load scripts in the footer, is when you have a very JavaScript heavy website, and loading in footer makes the page appear noticeably faster. (I would say at least 250ms faster)
Otherwise, it makes more sense to load them in the head. In this case, most servers will serve the files up fast enough that you won't be able to tell the difference.
P.S.
You can cut about 200 or so milliseconds off page load time by combining all the JS files into one and just serving that 1 file. This is due to the protocol for the server & client connection. You can achieve a similar effect without combining files by implementing SPDY
from semantic-ui-wordpress.
Thanks Nicholas!
from semantic-ui-wordpress.
No problem, and glad I could help 😃
Also, to extend my note on combining files and then serving them. The amount of the decrease in page load time varies from server-to-server, and is largely dependent on how Apache/PHP is configured to work on the system and where the server is located. For example, on a slower configuration, this may save you 400ms and on a faster and distributed system this may only save you 100ms.
from semantic-ui-wordpress.
Related Issues (20)
- A mistaken word in screenshot.png HOT 4
- editor_styles not compatible with WordPress 4.1 HOT 4
- Building to an external directory HOT 3
- Lorem Ipsum dev notes HOT 1
- Menus don't display HOT 3
- Request: screenshots & demo site HOT 4
- Extracting $GLOBALS causing OOM issues HOT 1
- Duplicate core template functions HOT 1
- inc/req/once functions are not necessary HOT 4
- TinyMCE height increases on every click, keypress, ... HOT 3
- Fatal error: Allowed memory size of 268435456 bytes exhausted HOT 11
- Request: THA implemented in to the default template HOT 2
- Menu Walker multiple menu classes HOT 10
- Uploading image issue HOT 3
- Media library is not functioning properly in 4.4.2 HOT 2
- Broken Menu on demo site HOT 1
- Wordpress media library broken wit this theme HOT 1
- wpfooter on all wp-admin removal HOT 1
- Demo WordPress not found HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semantic-ui-wordpress.