properly cache html