fosils/PhotoAccounting — pull request #2 by CloCkWeRX (2012-08-13 16:00:57+00:00)
Title: Here's a working implementation

Unfortunately, this had to make synchronous ajax calls, so you lose some of the fluid behaviour that your end users want - but you no longer see firefox errors.

One thing to note - in images included had a dud, which breaks rendering - I'm not sure if the expectation is the PHP side enforces that as never happening, or if the UI should recover from such a problem.
If it's the later, I'll add in a try/catch and warning behaviour.

So - what would I do differently in the long run?

Architecturally, I would
- Avoid localstorage in favour of plain old img tags in arrays
- Manage javascript arrays of the img dom nodes
- Render them in the background/offscreen somewhere, so there's no apparent "load" - browsers are great at loading millions of images over http; ajax + localstorage apis + rendering data images... not as much.

I can't say for sure that would yield better results, but it's worth a look - and looking at what slashdot.org does (scroll to the bottom of the page and it just loads more, which is similar to what you want), for example.