Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Best practices for minimizing download time for data-rich pages?

Best practices for minimizing download time for data-rich pages?

Best practices for minimizing download time for data-rich pages?

I just got our of a job interview as a CSS developer for a major telecom company to combine all their logged-in services into one portal, and the question I got hit with is "What do you do to minimize the number calls to the server for pages with large amounts of server-driven data and media?"

I'm a front-end developer. I answered about image preloading and httpRequests. I was getting a little over my head there. (I thought the interview was going to be about CSS.) Then they asked, "OK, image preloading still makes calls to the server, so what else could you do?" I was stumped. I said I will research that question. I have a suspicion that some aspects of AJAX may be involved, but I am not an AJAX developer. Am I on the right track? Any ideas?

RE: Best practices for minimizing download time for data-rich pages?


I'm a front-end developer.


I am not an AJAX developer

AJAX is front-end - it's just JavaScript that calls whatever server-side service it needs to. A lot of front-end roles now require AJAX experience, so you might want to start playing around with it - it's not hard once you get your head around the concept that ultimately, it's no different from a form submission or regular HTTP page request.

On the question you pose, one thing you need to remember is that AJAX still makes calls to the server - it can't just magic up data from nowhere, so using AJAX won't necessarily reduce the amount of data coming back from the server than not using AJAX.

I guess the key word there is necessarily. You can still write bad AJAX code that brings back as much data as delivering it to the page in the first place, but using AJAX makes it easier to write code that brings back only what is necessary. Take this example:

You have 10,000 names in a drop-down list, lets say each name is exactly 15 characters. If you were to deliver all of those names to the pages on initial load, that would be a minimum of 150,000 bytes - or 150Kb.

If you wrote a custom control that only bought back names after the user entered the first one or two letters of the name, you could cut that down dramatically. For example, if only 100 names began with the letter J, you would only need to download 1.5Kb of data.



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page @ Code Couch: http://www.codecouch.com/dan/

Code Couch Tech Snippets & Info: http://www.codecouch.com/

RE: Best practices for minimizing download time for data-rich pages?

Curious interview: looks like they want a free consulting service. I hate those ones: I get paid for answering this, interviews are just to check I'm a smart guy. My answer would be "Hire me and you will see"

Anyway, I agree Dan's point: there's no magic in Ajax, so I'd tell them that the important thinkg is user experience, so if you first load some media the user is waiting for, he will be busy for a while and you will have time enough to load the rest of the contents


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close