Though, you would see the request for main.css, onload won't fire for it on Firefox and Chrome(also chromium based browsers). It works fine for Safari. Check console.