New issue
Advanced search Search tips

Issue 867494 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Trouble preloading worker with link rel=preload

Reported by de...@oakley.global, Jul 25

Issue description

UserAgent: 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.
 
Labels: Needs-Triage-M67
Components: Blink>Workers
Components: Blink>Loader>Preload
Owner: kinuko@chromium.org
Status: Assigned (was: Unconfirmed)
[blink-worker triage] could you triage this?
Cc: kinuko@chromium.org hirosh...@chromium.org yhirano@chromium.org nhiroki@chromium.org
Labels: -OS-Mac -Needs-Triage-M67
Owner: ----
Status: Available (was: Assigned)
+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