Skip to content

[Documentation] Document the official MIME type for .gjs files #21133

Open

Description

@MichaelDeBoey

I’m working on improving MIME type support for modern web framework source files across tooling, servers, and content-type databases.

Currently, there does not appear to be an officially documented MIME type for .gjs files.
Some tools/frameworks use conventions such as text/x-<framework>, but there is no authoritative reference from the Ember project itself.
This create ambiguity for other projects to rely on a consistent mapping.

Having an official statement would help:

  • MIME databases include the mapping
  • web servers and CDNs configure correct content types
  • editors and language servers align
  • reduce ecosystem fragmentation

Would the Ember project be open to document an official recommendation for the MIME type of .gjs files?

This does not necessarily require IANA registration though.
A short note in the docs would already provide a reliable reference for downstream projects I think.

If another MIME type from text/x-ember (like text/plain, text/html, text/html+ember, ...) is preferred, documenting that choice would be equally helpful.

Thank you for your work and for considering this!

Activity

  1. NullVoxPopuli commented on Mar 2, 2026

    @NullVoxPopuli
    SponsorContributor

    hello! this does sound interesting, and I think would be appreciated.

    some considerations:

    • gjs / gts is a derivitive of javascript / typescript, respectively
    • these files may not (tho usually do) contain a superset of HTML for our component template format
    • the mime-db is a good reference
    • ember, the framework, doesn't have a single file type, and gjs/gts are not necessarily ember specific, ember is the only consumer of those filetypes at the moment

    because of this, and because there is already a widely used:

    so, I think any of the following could be good options -- idk if we need to necisarily choose unless we want proper registration? (tho, you mention it's not required) -- what project are you working on? @MichaelDeBoey

    • following vnd conventions (a la https://jsonapi.org/)
      • text/vnd.glimmer+javascript
      • text/vnd.glimmer+typescript
    • 🤷
      • text/x.javascript.glimmer
      • text/x.typescript.glimmer
      • text/x-javascript.glimmer
      • text/x-typescript.glimmer
      • anything else? really anything could be used, I suppose. The x convention is less familiar to me than vnd tho -- but I admit, I don't know the history behind either prefix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions