# \-6 The file or directory cannot be found on refresh in SPA

**URL:** <https://community.interop.io/t/6-the-file-or-directory-cannot-be-found-on-refresh-in-spa/576>\
**Category:** io.Connect Desktop\
**Created:** [May 8, 2026, 6:26am UTC](https://community.interop.io/t/6-the-file-or-directory-cannot-be-found-on-refresh-in-spa/576 "2026-05-08T06:26:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![toni.petrov](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.interop.io/toni.petrov/32/17_2.png) [@toni.petrov](https://community.interop.io/u/toni.petrov)\
**Post date:** [May 8, 2026, 6:26am UTC](https://community.interop.io/t/6-the-file-or-directory-cannot-be-found-on-refresh-in-spa/576/1 "2026-05-08T06:26:15Z")

</div>

### Problem

A single-page application running in io.Connect Desktop. The app opens correctly, but if the user presses **F5** , the window refreshes and the app may fail to load.

In an observed case, the app launched successfully from `index.html`, but after refresh the window attempted to load the current in-app route directly instead of `index.html`. The result was an error similar to:

`-6 The file or directory cannot be found.`

### Answer

You can disable refresh via the **F5** key by setting `disableRefreshOnF5` to `true` in the app definition, under `details`:

```json
{
  "name": "my-spa",
  "type": "window",
  "details": {
    "url": "https://example.com/index.html",
    "disableRefreshOnF5": true
  }
}

```

1. You can find `disableRefreshOnF5` in the io.Connect Desktop [application configuration schema](https://docs.interop.io/desktop/assets/configuration/application.json) (under the `window` definition) with the description: _“If `true`, the user cannot refresh the window.”_
2. The same property also exists in the [system configuration schema](https://docs.interop.io/desktop/assets/configuration/system.json), where it defaults to `false`.
3. This setting only disables refresh via the `F5` key. It does not change the underlying loading or routing behavior of the app itself.
