What will be the difference between-
- loading a JavaScript file that builds the whole html(from creating head, body tags to rest) and other application related staffs.
- loading an html which contains the skeleton(e.g. head, body tags) and JavaScript that builds the rest of the page and other staffs.
I need to adopt the best approach between these two for populating an iframe:
ifrm.src="http://somewhereintheuniverse.com/test.js"
or
ifrm.src="http://somewhereintheuniverse.com/widget.html"
Is the resource caching mechanism for both applies the same ? Suggestion describing pros and cons of both approach will be appreciated.