for example when i open http://code.google.com/apis/maps/documentation/examples/geocoding-simple.html for the first time, it doesn't load all the resources right away,but it pulls extra js files after it has loaded.
+1
A:
You'll need to grab the main HTML page and then parse it looking for external files that also need to be called. Then you would use cURL to download them separately.
John Conde
2010-04-07 13:01:09
A:
If I'm understanding what you're looking for, you want to defer the loading of external resources until later. That's called lazy loading. Check out this stuff:
http://www.appelsiini.net/projects/lazyload
http://ajaxian.com/archives/a-technique-for-lazy-script-loading
CSS isn't really lazy loading because if it isn't there, the page still does its thing anyway, just in a more ugly way.
mattbasta
2010-04-08 03:31:40