write out html and side js when html output is requested, to improve page load times