Optimize htmlfile