Efficient, resilient resource preloader for JS/CSS