Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes the $removeparam= parameter does not work #1767

Closed
5 tasks done
DeepChirp opened this issue Oct 17, 2021 · 7 comments
Closed
5 tasks done

Sometimes the $removeparam= parameter does not work #1767

DeepChirp opened this issue Oct 17, 2021 · 7 comments
Labels
duplicate This issue or pull request already exists

Comments

@DeepChirp
Copy link

DeepChirp commented Oct 17, 2021

Prerequisites

  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
  • The issue is not present after wholly disabling uBlock Origin ("uBO") in the browser
  • I checked the documentation to understand that the issue I report is not a normal behavior

I tried to reproduce the issue when...

  • uBO is the only extension
  • using a new, unmodified browser profile

Description

If the page is not reloaded and the link in the address bar is changed, the parameters in the address bar are not automatically cleared.

A specific URL where the issue occurs

https://www.baidu.com/s?wd=Test&rsv_spt=1&rsv_iqid=0xa83b935b000249f8&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_enter=0&rsv_dl=tb&oq=Test&rsv_btype=t&rsv_t=01c48EfWFiNRaqUEe4zGwXwnOqY5SawI8LatW4wHB3AAVN9s5wUo2c27lp0&rsv_pq=bdd8c98800097d0c

Steps to Reproduce

  • Add the following rules
||baidu.com^$removeparam=/^rsv/
||baidu.com^$removeparam=cl
||baidu.com^$removeparam=f
||baidu.com^$removeparam=fr
||baidu.com^$removeparam=hisfilter
||baidu.com^$removeparam=inputT
||baidu.com^$removeparam=issp
||baidu.com^$removeparam=n_type
||baidu.com^$removeparam=oq
||baidu.com^$removeparam=p_from
||baidu.com^$removeparam=prefixsug
||baidu.com^$removeparam=rsp
||baidu.com^$removeparam=tn
  • Open this page
  • Click the search button in the search box
    2021-10-17_09-53-25

Expected behavior

The first time you open it, the page parameters are cleared. But after clicking the search button in the search bar, the page parameters will not be cleared.

Actual behavior

Web parameters should be cleaned whenever.

Configuration

No need

@uBlock-user
Copy link
Contributor

$removeparam will only work on network requests, location url changed without firing a network request won't have params removed.

@gorhill
Copy link
Member

gorhill commented Oct 17, 2021

Yes, duplicate of #1704. I verified with AdGuard, and the behavior is the same as with uBO. However, I can understand the confusion and I will investigate whether a somewhat trivial fix is possible before closing.

@DeepChirp
Copy link
Author

shenzhiming88 :

Prerequisites

 [x]  I performed a cursory search of the issue tracker to avoid opening a duplicate issue

Really? A duplicate of #1704

I'm sorry that since I'm not good with English, I didn't search for a similar question.

@uBlock-user uBlock-user added the something to address something to address label Oct 17, 2021
@gorhill
Copy link
Member

gorhill commented Oct 17, 2021

@gorhill
Copy link
Member

gorhill commented Oct 17, 2021

There is no easy solution for this, there is no extensions API for just changing the URL without causing a reload of the page. There is loadReplace in Firefox (not Chromium), but a page reload still occurs. The only solutions I can think of would involve dubious code to detect when the URL changes in the address bar, and I rather not go there for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants
@gorhill @uBlock-user @DeepChirp and others