Skip to content

fix(webserver): avoid form resubmission prompt on auto-refresh - #230

Merged
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:feature/issues3
Jun 22, 2026
Merged

fix(webserver): avoid form resubmission prompt on auto-refresh#230
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:feature/issues3

Conversation

@ngosang

@ngosang ngosang commented Jun 22, 2026

Copy link
Copy Markdown
Member

Fix for #226

The auto-refresh introduced in 2effbb2 used location.reload(), which repeats the original request. On pages whose forms POST (e.g. filtering downloads by category), each timed reload resubmitted the POST data, triggering the browser's "confirm form resubmission" dialog and breaking the page.

Replace location.reload() with window.location.href = window.location.href so the auto-refresh performs a plain GET navigation, matching the old behavior. Filter/sort state is preserved because it is stored in $_SESSION. Applied uniformly to dload, kad, search, servers, shared and stats pages in the default template.

The auto-refresh introduced in 2effbb2 used location.reload(), which
repeats the original request. On pages whose forms POST (e.g. filtering
downloads by category), each timed reload resubmitted the POST data,
triggering the browser's "confirm form resubmission" dialog and breaking
the page.

Replace location.reload() with window.location.href = window.location.href
so the auto-refresh performs a plain GET navigation, matching the old
<meta refresh> behavior. Filter/sort state is preserved because it is
stored in $_SESSION. Applied uniformly to dload, kad, search, servers,
shared and stats pages in the default template.
@ngosang
ngosang marked this pull request as ready for review June 22, 2026 11:21
@ngosang
ngosang merged commit f5c1e9a into amule-org:master Jun 22, 2026
10 checks passed
@ngosang
ngosang deleted the feature/issues3 branch June 22, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant