Comments (3)
Wow, I didn't actually know this. Is it ok to remove this then or what is the down side?
from motherplate.
It is ok. If you insert JS at the bottom of your document the DOM will be ready by the time the parser gets to your script. The browser executes the script from the top to the bottom.
Doing so, the browser doesn't have to parse all the JS files and, by the time it reaches your scripts, the page is largely already displayed to the user. This improves perceived load time for your page.
You can find out more on this thread: http://stackoverflow.com/questions/6026645/document-readyfunction-vs-script-at-the-bottom-of-page
from motherplate.
Makes sense. I'm going to keep it in here anyway in case I move the main.js file to the head, which occasionally I do for one reason or another. Thanks for heads up though.
from motherplate.
Related Issues (5)
- Issue with support-for? HOT 3
- Compass HOT 1
- License HOT 1
- Use https for font import HOT 1
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 motherplate.