put script in header to prevent flash