News for hackers. Stuff that matters.
Re:Paul Graham: The 10 Secrets of Selling Online (1997) by hs on Tuesday April 07, 2009 @09:21PM (#552097)
i have sites with hovering ajax and yes the performance can be slow (it's the ajax)

i don't like 'loading' message on every ajax call so what did i do? i pre-load every js and combine few images into one (not sprites due to dynamic nature) to reduce http request

in your case, it could be: sprite the shoe.jpg to watch.jpg to top.jpg sprite the pumps.jpg ... evening.jpg to middle-shoe.jpg sprite the first 6 shoes into down-shoe.jpg

so for these sprites: 1 + 4 + (10 + 6 + 6 + 4) = 31 files

or you can combine into one big file

the point is not to make user wait for the 'first impression' when (for example) s/he clicks handbags > baby

if s/he wants to click next after seeing the first items, then ajax call can be used (make it one file instead of six) but pre-load the prices into js (or <bad> put price into the file-name like shoe-2-59-49-99-29-39-79.jpg and parse -, map the prices </bad>) so you only need to call 1 instead of 2 or 6 or more http

There are no comments on this comment yet.