document.body.offsetWidth is not yet defined when still processing head