An HTML5-based framework to optimize mobile performance