Skip to content


Duplicated form parameters when form is submitted repeatedly #5710

mikez302 opened this Issue · 3 comments

2 participants


I have a page that looks like this:

<!DOCTYPE html>
        <meta charset="UTF-8"/>
        <title>Duplicate form parameter test</title>
        <link rel="stylesheet" href="" />
        <script src=""></script>
        <script src=""></script>
        <div data-role="page">
            <div data-role="header">
                    <input type="search" name="searchQuery">

If I type something in the search input, for example "foo", I will get redirected to After that page loads, if I type something else, for example "bar", I will get redirected to Note the double searchQuery parameters.

If I don't use jQuery Mobile, I am simply redirected to I don't know if this is a bug or intended behavior.

I can work around this bug by putting an action attribute on the form but I think this is still worth mentioning.


I threw the above code into a jsbin.


Simply adding action="#" on the form doesn't fix the problem.


@johnbender, @gseguin, @uGoMobi, @arschmitz, could you please have a look at the commit above? Can we get rid of the check for the method and always strip off the query?

The reason I left the check in place is that I was thinking that, if the form is submitted via POST, the URL could contain a query string, in which case those variables will be received on the server side in the GET array, whereas the data will be received in the POST array.

@gabrielschulhof gabrielschulhof added a commit that referenced this issue
@gabrielschulhof gabrielschulhof Navigation: When submitting a form via GET, strip query off URL befor…
…e creating new query string. Fixes #5710.

(cherry picked from commit 0d4e839)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.