{"id":15700664,"url":"https://github.com/zachleat/async-css-loading","last_synced_at":"2026-03-06T23:32:18.850Z","repository":{"id":137955801,"uuid":"108350983","full_name":"zachleat/async-css-loading","owner":"zachleat","description":"Test cases for asynchronous css loading","archived":false,"fork":false,"pushed_at":"2022-02-09T21:15:01.000Z","size":14,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-12T16:49:11.128Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zachleat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-26T02:23:42.000Z","updated_at":"2025-02-06T02:50:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"9034b344-109f-42ef-a0f3-cd0ed45144b9","html_url":"https://github.com/zachleat/async-css-loading","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zachleat/async-css-loading","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Fasync-css-loading","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Fasync-css-loading/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Fasync-css-loading/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Fasync-css-loading/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zachleat","download_url":"https://codeload.github.com/zachleat/async-css-loading/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachleat%2Fasync-css-loading/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30203344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T19:52:00.873Z","updated_at":"2026-03-06T23:32:18.832Z","avatar_url":"https://github.com/zachleat.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# async-css-loading\n\nCurrent state of the art is [`filamentgroup/loadCSS`](https://github.com/filamentgroup/loadcss). Every other individual test below has major limitations in at least one modern browser.\n\n## Default (always blocks)\n\n* `\u003clink\u003e` in `\u003chead\u003e`\n\t* [Source code](./default.html)\n\t* [Demo](https://www.zachleat.com/async-css-loading/default.html)\n\n## Link in `\u003cbody\u003e`\n\n* `\u003clink\u003e` in middle of `\u003cbody\u003e`\n\t* [Source code](./link-body-middle.html)\n\t* [Demo](https://www.zachleat.com/async-css-loading/link-body-middle.html)\n\t* _blocks in Chrome, Chrome for Android, Mobile Safari_\n* `\u003clink\u003e` at the end of `\u003cbody\u003e`\n\t* [Source code](./link-body-end.html)\n\t* [Demo](https://www.zachleat.com/async-css-loading/link-body-end.html)\n\t* _blocks in Chrome, Chrome for Android, Mobile Safari_\n\n_Related Chromium issue_: [#481122](https://bugs.chromium.org/p/chromium/issues/detail?id=481122) Allow the page to render before `\u003clink\u003e` tags in body\n\n## Attribute toggle using JavaScript\n\n* `\u003clink\u003e` toggles `media` attribute\n\t* [Source code](./link-mediatoggle.html)\n\t* [Demo](https://www.zachleat.com/async-css-loading/link-mediatoggle.html)\n\t* _never applied in Android ≤ 4.3, `\u003clink onload\u003e` not supported_\n* Using `filamentgroup/loadCSS`\n\t* [Source code](./loadcss.html)\n\t* [Demo](https://www.zachleat.com/async-css-loading/loadcss.html)\n\t* _subject to [loadCSS browser support](https://github.com/filamentgroup/loadcss#browser-support)_\n* Using `\u003clink rel=\"preload\"\u003e` and toggles `rel` attribute\n\t* [Source code](./preload.html)\n\t* [Demo](https://www.zachleat.com/async-css-loading/preload.html)\n\t* _subject to currently limited [`preload` browser support](http://caniuse.com/#feat=link-rel-preload)_\n* Using `\u003clink rel=\"preload\"\u003e` with `filamentgroup/loadCSS` polyfill\n\t* [Source code](./preload-fallback.html)\n\t* [Demo](https://www.zachleat.com/async-css-loading/preload-fallback.html)\n\t* _subject to [loadCSS browser support](https://github.com/filamentgroup/loadcss#browser-support)_\n\n## JavaScript created `\u003clink\u003e`\n\nFor browsers obeying the HTML5 specification, these should not block render.\n\n* `document.createElement(\"link\")` in `\u003cbody\u003e`\n\t* [Source code](./link-js-body-end.html)\n\t* [Demo](https://www.zachleat.com/async-css-loading/link-js-body-end.html)\n\t* _blocks in Mobile Safari_\n* `document.createElement(\"link\")` in `\u003chead\u003e`\n\t* [Source code](./link-js-head.html)\n\t* [Demo](https://www.zachleat.com/async-css-loading/link-js-head.html)\n\t* _blocks in Mobile Safari_\n\n_Related WebKit issue_: [#88869](https://bugs.webkit.org/show_bug.cgi?id=88869) renderer should not block on script-inserted stylesheets\n\n## Extra\n\n### Dependencies\n\nUses a styles.php to add a `sleep()` call to the stylesheet so that it loads slower.\n\n### Prior Art\n\n* https://github.com/filamentgroup/loadcss\n* https://gist.github.com/igrigorik/2935269#file-notes-md","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachleat%2Fasync-css-loading","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzachleat%2Fasync-css-loading","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachleat%2Fasync-css-loading/lists"}