externalize html/javscript output contents