File Hosting & Sharing

Static File Hosting

Definition

Static file hosting is the plainest job a web server can do: find the file that matches the requested path, and send it. Nothing is compiled, queried or rendered at the moment of the request — there is no application process, no database lookup, no template being filled in with today's numbers. The files are ordinary web assets: an 'index.html', a stylesheet, some JavaScript, images, a PDF, a downloadable archive. Because the answer is decided before anyone asks the question, the response can be cached hard and copied to machines near the visitor. This is how a static site reaches a browser, and it is equally how a single hosted image or invoice does.

Why It Matters

Speed and predictability come from the same fact: there is no work to do. A page assembled on demand might spend 200 ms building itself before the first byte leaves the server, where a static file can be answered out of an edge cache in under 20 ms. Nothing executing also means very little to attack — no injection into a query that is never made, no runtime to patch on a Tuesday evening, no process to fall over under load. The trade is real: anything genuinely per-visitor, such as a signed-in dashboard, has to happen in the browser or against a separate API, because the server will not do it for you.

How It Works

The host maps a URL path to a stored object and returns it. A request for /docs/guide.pdf finds the object at that key and replies with Content-Type: application/pdf and the file's bytes. A request that ends in a directory, like /docs/, conventionally resolves to the 'index.html' inside it. Headers do the rest of the work: Cache-Control sets how long a copy may be reused, an ETag lets a browser ask whether its copy is still current and be told 304 Not Modified, and Content-Encoding marks a gzip or Brotli transfer. Since none of this varies by visitor, a CDN can hold the finished response at hundreds of locations and answer without ever troubling the origin.

Real-World Example

A designer exports a portfolio from a site builder and ends up with a folder: one 'index.html', a CSS file, and thirty JPEGs. Zipped and dropped into 99helpers, it unpacks and goes live at nadia-work.99helpers.site with no build step and nothing to configure. Each image is served from the edge, so the gallery finishes loading on a phone in about a second. The only moving part was the upload; after that, every visitor receives precisely the bytes the designer exported.

Common Mistakes

  • Expecting a form on the page to do something — with no server-side processing there is nothing to receive the POST unless the form points at an external endpoint
  • Using absolute paths like /assets/logo.png in a project served from a subfolder — the request resolves to the wrong place and the asset returns 404
  • Setting a long cache lifetime on 'index.html' — visitors keep the old page for hours after you publish, because the file name never changed

Related Terms

Put a file online in seconds

Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.

Host a file free →