Bug 183666

Summary: Safari fails to load dynamic stylesheets
Product: WebKit Reporter: Shimon Schwartz <shimon.schwartz>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Critical CC: bfulgham, koivisto, shimon.schwartz, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar, Regression
Version: Safari Technology Preview   
Hardware: All   
OS: All   
Attachments:
Description Flags
Example none

Description Shimon Schwartz 2018-03-15 10:56:03 PDT
Created attachment 335862 [details]
Example

Summary:
Safari fails to load a stylesheet via a link tag that was modified at the runtime. 

Steps to Reproduce:
1. create a blank html5 page 
2. add a <link rel="preload" as="style" href="{ stylesheet url }"> tag
3. add a script that executes on window load event, which updates the above tag rel attribute to "stylesheet"

See attached code as an example.

Expected Results:
CSS loads and is applied to the page

Actual Results:
CSS never loads

This works on Safari 11.0 and older, and on all other browsers

Version/Build:
Safari 11.1 beta 4, both desktop and iOS
Comment 1 Radar WebKit Bug Importer 2018-03-15 11:46:22 PDT
<rdar://problem/38509544>
Comment 2 Antti Koivisto 2018-03-15 14:42:07 PDT

*** This bug has been marked as a duplicate of bug 183601 ***