This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

[Feature request] Add <library> tag, similar in purpose to <script> tag

  • 2 replies
  • 1 has this problem
  • 1 view
  • Last reply by vlisivka

more options

As developer, I need <library> tag for my products, which will allow me to implement future-proof solutions for my clients.

Currently, I need to bundle libraries with application, to be independent from third-party sites, so browser needs to download/parse/compile them again and again for each site. What I need is a tag, which will allows me to offload library loading to browser, so browser will be able to download library and compile and optimize it ahead of time. Moreover, if bug-fix for library is released, browser can use bug-free version of library. Moreover, developers can release browser-specific versions of same library, e.g. optimized for specific kind of Firefox or specific version of Firefox.

Proposed syntax is: <library name="LIBRARY_NAME" version="LIBRARY_VERSION"><script src="https://.../library.js"></script></library> , where LIBRARY_NAME is well-known name of the library, as registered at CDN, e.g. "react", and LIBRARY_VERSION is version of library in SEMVER format , with optional "^" to indicate that upgrade to next minor version is allowed, when it is released, e.g. "^5" (5.0, 5.1, 5.2, ...) , or "^5.0" (5.0.1, 5.0.2, ...), or "5.0.3" (5.0.3-1, 5.0.3-2, ...).

Example:

<library name="react" version="^15.0"><script src="https://mysite/js/vendor/react-15.0.1.js"></script></library>

As developer, I need <library> tag for my products, which will allow me to implement future-proof solutions for my clients. Currently, I need to bundle libraries with application, to be independent from third-party sites, so browser needs to download/parse/compile them again and again for each site. What I need is a tag, which will allows me to offload library loading to browser, so browser will be able to download library and compile and optimize it ahead of time. Moreover, if bug-fix for library is released, browser can use bug-free version of library. Moreover, developers can release browser-specific versions of same library, e.g. optimized for specific kind of Firefox or specific version of Firefox. Proposed syntax is: <library name="LIBRARY_NAME" version="LIBRARY_VERSION"><script src="https://.../library.js"></script></library> , where LIBRARY_NAME is well-known name of the library, as registered at CDN, e.g. "react", and LIBRARY_VERSION is version of library in SEMVER format , with optional "^" to indicate that upgrade to next minor version is allowed, when it is released, e.g. "^5" (5.0, 5.1, 5.2, ...) , or "^5.0" (5.0.1, 5.0.2, ...), or "5.0.3" (5.0.3-1, 5.0.3-2, ...). Example: <library name="react" version="^15.0"><script src="https://mysite/js/vendor/react-15.0.1.js"></script></library>

All Replies (2)

more options

This probably needs to be standardized first before it is going to be added to Firefox. The HTML5 standard is mostly discussed/developed by these folks:

https://whatwg.org/

The HTML page at https://html.spec.whatwg.org/multipage/ has links for a mailing list and links to read and submit issues on Github.

more options