Wednesday, July 30, 2008

Rails Tip: Render, Better, JS Later

There are certain standards we got used too when creating rails views and layouts, which may cause a problem or some set backs to our applications.
We are all used to coding the JS includes way up in our document, moving the JS to the bottom of the page will render your page a little bit faster, and this is why.

When a browser reads a page, it goes through from the top to the bottom, So when we put the JS include's up, the browser will attempt to download them and hold the dom parsing until it finishes.

No comments:

Post a Comment

Tell me what you think