optimize header for devices