separated document head information to fix cookie errors