Open Metric
Science, Fiction and Me

Today I Learned

Start a Simple Server

Sometimes we debug html locally but run into the error

XMLHttpRequest cannot load file:///xxx/xxx/xxxx.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.

The solution is to run a very simple static web server locally by using a python one-liner

python -m SimpleHTTPServer 8000

A Random #TIL# for You

Most technical TILs will be updated at

By OctoMiao

Last updated