Ajax V. Including Data In The Html
Solution 1:
The obvious answer in MOST applications is to include them directly, although I would always recommend treating every usage per its own needs. Remember that 'page load speed' is as much perception as it is a measurable stat, especially when dealing with ajax functionality.
Example
You have loads and loads of data to display, if you include it natively with the page will actually be perceived to take much more time to load to the end user than if you load the initial page and bring in the data in chunks. You can see this in place as an alternative to pagination that facebook uses, and the chunks of data are brought in as the user scrolls.
Solution 2:
Always include them directly if you have the choice, it will give a considerable benefit to page load speed.
Post a Comment for "Ajax V. Including Data In The Html"