Trouble preloading worker with link rel=preload
Reported by
de...@oakley.global,
Jul 25
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36 Steps to reproduce the problem: 1. Add a link rel=preload to worker with either as=script or as=worker 2. Try new Worker() What is the expected behavior? Worker is preloaded potentially saving 790ms according to lighthouse What went wrong? Either a warning that "something was preloaded and not used" or "must have a valid `as` value" Did this work before? No Does this work in other browsers? No When I preform a lighthouse audit it recommends preloading my worker. Unfortunately I have had no luck in doing this. With preload as=script chrome and safari warns me that "something was preloaded and not used within a few seconds" even though new Worker() happens almost immediately. Trying as=worker; chrome and safari error with "must have a valid `as` value". According to this mdn article https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content, under the heading "What types of content can be preloaded?", it mentions "worker: A JavaScript web worker or shared worker". Chrome version: 67.0.3396.99 Channel: stable OS Version: OS X 10.13.6 Flash Version: Not sure if this is a bug or not though Yoav Weiss kindly requested this to be logged.
,
Jul 26
,
Jul 27
[blink-worker triage] could you triage this?
,
Jul 31
+nhiroki, hiroshige, yhirano As far as I know we currently load (classic) worker scripts as RawResource which cannot match with preloads, and we don't support as="worker" either in LinkLoader::GetResourceTypeFromAsAttribute, therefore it's just not supported yet. |
||||
►
Sign in to add a comment |
||||
Comment 1 by susan.boorgula@chromium.org
, Jul 25