Bug 183666 - Safari fails to load dynamic stylesheets
Summary: Safari fails to load dynamic stylesheets
Status: RESOLVED DUPLICATE of bug 183601
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: All All
: P2 Critical
Assignee: Nobody
Keywords: InRadar, Regression
Depends on:
Reported: 2018-03-15 10:56 PDT by Shimon Schwartz
Modified: 2018-03-15 14:42 PDT (History)
6 users (show)

See Also:

Example (831 bytes, application/zip)
2018-03-15 10:56 PDT, Shimon Schwartz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shimon Schwartz 2018-03-15 10:56:03 PDT
Created attachment 335862 [details]

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

Safari 11.1 beta 4, both desktop and iOS
Comment 1 Radar WebKit Bug Importer 2018-03-15 11:46:22 PDT
Comment 2 Antti Koivisto 2018-03-15 14:42:07 PDT

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