When you click the Download this Album link it prefetches all the id's and stores it in the clicked elements data-ids attribute. IMO it would be better to create an own model for tarball generations, and let the load method store the ids if not present, rather than a seperate click handler. But this was easier to implement.