# jumanji

> When Safari goes wrong.

Latest version **0.1.1** (published 2014-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install jumanji
pnpm add jumanji
yarn add jumanji
bun add jumanji
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2014-08-08 |
| First published | 2014-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 21 |
| Author | Dominic Barker |
| Maintainers | dakuan |
| Keywords | express, middleware, safari, the-thing-that-should-not-be, connect, cache-control |

## Links

- npm: https://www.npmjs.com/package/jumanji
- Repository: https://github.com/Dakuan/jumanji
- Issues: https://github.com/Dakuan/jumanji/issues
- npm.io page: https://npm.io/package/jumanji

## Dependencies (1)

- [useragent](https://npm.io/package/useragent.md) ^2.0.9

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2014-08-08
- 0.1.0 — 2014-08-08
- 0.0.1 — 2014-08-08

## README

Jumanji
=======

![stampede](http://www.kinomuseum.de/Rueckblende/OA-06/OA-06-pics/stampede.jpg)

## For when Safari goes wrong

There appears to be a bug in Safari and Mobile Safari where in private browsing mode it will add a `'Cache-Control': 'maxage=0'` header to a request while clearing the browser cache at the same time. Express will reasonably respond with a `304` status code. This causes Safari to attempt to load the page from its empty cache, leaving the user seeing...nothing.

Bad Safari.

Jumanji is a middleware component that hacks around this issue. It's not big and it's not clever but it's got users seeing pages again.

## Installation

```bash
$ npm install jumanji
```

## Usage

```javascript
var express = require('express'),
    app = express(),
    jumanji = require('jumanji');

app.use(jumanji);
```

## Further Reading

* [Blog detailing another fix](http://tech.vg.no/2013/10/02/ios7-bug-shows-white-page-when-getting-304-not-modified-from-server/)
* [Commit to Expressjs dependency](https://github.com/visionmedia/node-fresh/commit/f2c79c24b411ce56e051d1c8bf91b9d6a33e4e49)
* [Expressjs dependency github issue](https://github.com/visionmedia/node-fresh/issues/8)
* [Why Apple won't fix it](https://bugs.webkit.org/show_bug.cgi?id=32829)

---
_Source: https://npm.io/package/jumanji · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
