# Block keyboard reload

> Stop F5, Ctrl+R and Cmd+R from reloading the page and cutting off a persistent player. (Pro)

Source: https://arraystory.com/docs/ajaxpress/block-keyboard-reload/

A reload restarts everything on the page, including a radio stream or podcast that's been playing across pages. **Block Keyboard Reload** stops the common reload shortcuts, so a stray keypress can't cut the sound.

It's under **Settings → AjaxPress → Basic**, needs [AjaxPress Pro](https://arraystory.com/docs/ajaxpress/ajaxpress-pro/), and is off by default. It only shows while **Enable SPA for Frontend** is on.

![Block Keyboard Reload stops Ctrl+R and F5 from restarting the radio.](https://r2.arraystory.com/docs/ajaxpress/block-keyboard-reload.mp4?v=b09e83f8df)

## What it blocks

| Shortcut | Blocked |
| --- | --- |
| <kbd>F5</kbd> | Yes |
| <kbd>Ctrl</kbd>+<kbd>R</kbd> (Windows, Linux) | Yes |
| <kbd>Cmd</kbd>+<kbd>R</kbd> (Mac) | Yes |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd> or <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd> (hard reload) | No |
| The browser's reload button, or pull-to-refresh on a phone | No |

The keys are only caught while the page content has the keyboard focus. They still reload the page when:

- the cursor is in the browser's address bar;
- the visitor has just clicked a control in a [persistent player](https://arraystory.com/docs/ajaxpress/keep-audio-or-video-playing-across-pages/), such as its play button, and hasn't clicked the page since. The player sits outside the page content, so the keys go to it instead.

## Who should use it

Radio stations, podcast sites and music sites, where visitors keep a player running while they browse. On other sites, leave it off: visitors expect <kbd>F5</kbd> to work.

> [!NOTE]
> This isn't a way to stop visitors from reloading. The browser's reload button always works, as it should. It only catches the accidental keypress.

## Related

- [Keep audio or video playing across pages](https://arraystory.com/docs/ajaxpress/keep-audio-or-video-playing-across-pages/)
- [My player stopped working](https://arraystory.com/docs/ajaxpress/my-player-stopped-working-a-diagnostic/)
