You’re including jQuery and a number of plugins in your page. The sheer number of server requests is slowing down your page load time:
After the page loads, you are downloading some JSON data using $.getJSON(), thus adding yet another server request:
Load jQuery from Google’s Ajax library, and combine all your plugins into a single file:
Either way, it also helps to minify the .jsfiles (remove comments and extra white space)to reduce their size. And make sure your server is using gzip compression on the files it downloads.
For the JSON data, since this page is generated by your own server application, you can “burn” the JSON data directly into the HTML page as it’s generated, using a
The highlighted portion of that script tag is identical to the JSON data downloaded by myjson.php in the original code. In most server languages it should be easy to include the content in this way.
Now the jQuery code to use the JSON data is simply:
This eliminates one more server request.
One of the keys to fast page loading is to simply minimize the number of HTTP requests .Making requests to different servers can also help. Browsers will make only a small number of simultaneous downloads from any single domain (or sub domain), but if you download some of your files from a different domain, the browser may download them in parallel as well.
Ruby on Rails:
J Query Related Interview Questions
|HTML 4 Interview Questions||HTML Interview Questions|
|HTML 5 Interview Questions||Zend Interview Questions|
|JqueryUI Interview Questions||Dynamic HTML Interview Questions|
|XQuery Interview Questions||jQuery Mobile Interview Questions|
J Query Related Practice Tests
|HTML 4 Practice Tests||HTML Practice Tests|
|HTML 5 Practice Tests||Zend Practice Tests|
|PHP and Jquery Practice Tests||J Query Practice Tests|
|CodeIgniter Practice Tests||Dynamic HTML Practice Tests|
J Query Tutorial
Selecting Elements With Jquery
Beyond The Basics
Faster, Simpler, More Fun
Html Form Enhancements From Scratch
Html Form Enhancements With Plugins
Interface Components From Scratch
User Interfaces With Jquery Ui
Jquery Ui Theming
Jquery, Ajax, Data Formats: Html, Xml, Json, Jsonp
Using Jquery In Large Projects
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.