Give help. Get help.

  • # March 24, 2013 at 12:08 pm

    I am creating a business directory.
    on the directories listing page where all the businesses are listed, I have that when you hover over the thumbnail of a listing it shows a google map and some info for that listing.

    I can do this 2 ways:

    I can have the thumbnail and the google maps (might be 50 of them loading on 1 page) and info all loaded on page load and then hide the info and maps till hover on. This means everything is loaded onto the page.
    I can have the thumbnails load and then on hover have ajax grab the info from another page.

    which one is smarter and faster?

    i’ve never used ajax to load things before, so Im itching to try it.

    # March 24, 2013 at 12:38 pm

    Ajax would be smarter and faster compared to the other solution. I’d just pay very close attention to minimize each http request and compress your stylesheets and scripts as much as possible.

    # March 24, 2013 at 12:54 pm

    I would suggest to have the images load, preferably use javascript to defer a load until the dom is built that way they will be cached into the browser rather than trying to use ajax to call them depending on what link is hovered. Like chris said, if there is going to be a lot of images then you need to optimize your resources as much as possible.

    If you were to go about using ajax just dont forget about using $.Deferred because you can have so much more control, but like i said, i wouldn’t go the ajax route just yet.

    # March 24, 2013 at 3:21 pm

    ive never used deferred so i have no clue what it does.
    when you say have the images load, do you mean have the thumbnails load?
    what about the rest of the info and the google maps?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.