denoland / denoland/website_feedback

`cdn.deno.land` should serve files with `charset=utf-8`

Open
#5 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
8
Forks
1
PR merge metrics
No merged PRs in 30d

Description

```sh-session
$ curl -sI https://cdn.deno.land/dayjs/versions/v1.11.3/raw/README.md | grep content-type
content-type: text/markdown
$ # Same file served by GitHub (raw)
$ curl -sI https://raw.githubusercontent.com/iamkun/dayjs/v1.11.3/README.md | grep content-type
content-type: text/plain; charset=utf-8
x-content-type-options: nosniff

$ curl -sI https://cdn.deno.land/dayjs/versions/v1.11.3/raw/src/locale/ja.js | grep content-type
content-type: application/javascript
$ # Same file served by GitHub (raw)
$ curl -sI https://raw.githubusercontent.com/iamkun/dayjs/v1.11.3/src/locale/ja.js | grep content
-type
content-type: text/plain; charset=utf-8
x-content-type-options: nosniff

$ # Static JS/CSS files served by Vercel
$ curl -sI https://static-tweet.vercel.app/_next/static/chunks/webpack-0f6269dce2a0168ec6fb.js |
grep content-type
content-type: application/javascript; charset=utf-8
$ curl -sI https://static-tweet.vercel.app/_next/static/css/e4d761b45656b197a445.css | grep conte
nt-type
content-type: text/css; charset=utf-8
```

Notice how `cdn.deno.land` doesn't serve files with `charset=utf-8` in `content-type` HTTP header while other popular services (GitHub[^1] and Vercel) do.

This is not a serious issue per se, but could potentially lead to garbled text in programs, and (especially) when developers are inspecting the files in the browser directly:

image

[^1]: GitHub raw uses `text/plain` to discourage hotlinking as raw links are not meant for that.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.