unnecessary script statements are removed in the head html