Search code examples
htmlgoogle-chromeweb-componenthtml-imports

Is HTML Import still supported in Google Chrome?


According to http://blog.teamtreehouse.com/introduction-html-imports

To enable HTML imports in Chrome, go to chrome://flags and enable the Enable HTML Imports flag. Once you’re done, click the Relaunch Now button at the bottom of the screen to restart Chrome with support for HTML imports.

But I can't find it in latest version of Google Chrome flags


Solution

  • HTML Imports are implemented natively in Chrome, Opera and Android.

    It is still a W3C Working Draft.

    For other browsers, you can use:

    Update 2019

    HTML Imports won't be supported natively after Chrome 73. You should then use another solutions:

    • the polyfill,
    • an alternate module loader,
    • JS import combined with template literals,
    • a direct download with fetch().

    Update 2020

    HTML Imports were definitvely removed.