Moved require settings and appcache update outside of HTML doc.