Using Chrome as a Local Web Server

Chrome version 65+ can double as a local static web server

Justin Mathews
4 min readApr 24, 2018
Chrome grille and headlights of a vintage car. Photo by Dave Ashton on Unsplash

Many web developers like me utilize Chrome Developer Tools as a versatile tool for web development. It comes in quite handy for making live CSS or HTML changes or analyzing web pages. Chrome release 65 gave us a long awaited and nifty tool for overriding resources used by web pages and replacing them with our own local resources. For example you can override a CSS file used by a web page and make local changes to the CSS file. Any change you make to CSS properties is reflected live in the web browser.

A little known fact is that this local override feature can be used to create a web server to serve static web pages. And you can name the domain of your web server whatever you like. Even if the domain name already exists, Chrome will serve pages from your own server if the requested page or resource exists on your local server.

Let us go step by step on how to create a static web page server using Chrome Developer Tools override feature. I am going to use chromeserver.comas my domain name:

Figure 1. My Chrome local override folder structure
  1. Create a local folder to be the root of all your local…

--

--