# Markdown Content Negotiation

BD Event serves its public pages in two formats, negotiated via the `Accept` request header (per the [acceptmarkdown.com](https://acceptmarkdown.com) convention).

## How it works

| Request `Accept` header | Response |
| --- | --- |
| `text/markdown` | `Content-Type: text/markdown` — the page rendered as Markdown |
| `text/html` (browsers) | `Content-Type: text/html` — the normal website |
| `*/*` or empty (curl default) | HTML |

The server compares quality values (`q=`), so a request like `text/markdown, text/html;q=0.9` returns Markdown, while a browser's `text/html,application/xhtml+xml,...;q=0.9` returns HTML.

All negotiated responses include `Vary: Accept, Accept-Encoding` so caches store the correct variant per request.

## Which URLs negotiate

- `/` — the full event catalog (all + filters via query string, e.g. `/?q=sales` or `/?topic=AI`)
- `/secc.php` — SECC event zone
- `/event.php?id=N` — a single event detail
- Any 404 — a Markdown "not found" page with recovery links

## Example

```bash
curl -s -H "Accept: text/markdown" https://events.gomievibes.online/ | head -20
```

```markdown
# BD Event

Những sự kiện đáng tham dự dành cho cộng đồng Sales, Business Development và doanh nghiệp tại Việt Nam.

## Zones
...
```

## Why

Agents parse Markdown more reliably than HTML (no menus, no JavaScript, no login walls), and the unambiguous `Content-Type` plus correct `Vary` header prevents a CDN from serving the wrong variant.