Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Does Digg remove "&x=0&y=0" from their Search Results URL?

I'm using an image as the submit button for a search form, i.e.:

<input id="search" type="image" alt="Search" src="/images/searchButton.png" name=""/>

This has an unfortunate side effect in Chrome and Firefox--the parameters &x=0&y=0 appear on the end of the search results URL, for example if I search for "food" I am directed to the page:

main/search?search=food&x=0&y=0

Some hunting around online has indicated that this is standard behavior when you use an image to submit a form.

I noticed that Digg.com uses an image to submit its search form but avoids this behavior. I can't figure out how they do it. They don't seem to be using Javascript to submit the form. Can anyone tell?

like image 307
Jack7890 Avatar asked Dec 08 '25 10:12

Jack7890


1 Answers

Digg is using JavaScript to do that. Try submitting the search form with JavaScript disabled in your browser.

like image 72
Tatu Ulmanen Avatar answered Dec 10 '25 00:12

Tatu Ulmanen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!