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

HTML filters don't work on first page opened after browser start #3222

Open
9 tasks done
jackrjli opened this issue Apr 23, 2024 · 7 comments
Open
9 tasks done

HTML filters don't work on first page opened after browser start #3222

jackrjli opened this issue Apr 23, 2024 · 7 comments

Comments

@jackrjli
Copy link

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

My HTML filters do not work on the first site I visit after opening the browser. If I visit some other page first, even in a different tab, or if I refresh the page after visiting it, the filters do work. The filters also work on the first page visit if I convert them to cosmetic filters. When the issue occurs, the logger shows the page load but does not show the filter being applied.

A specific URL where the issue occurs.

http://example.com

Steps to Reproduce

  1. Add the following rule to "My filters": example.com##^h1
  2. Set homepage to "Blank page" in Firefox settings
  3. Restart Firefox
  4. Go to example.com before any other sites

Expected behavior

HTML filter removes the heading element saying "Example Domain"

Actual behavior

"Example Domain" heading remains on the page until refreshing or revisiting the page

uBO version

1.57.2

Browser name and version

Firefox 125.0

Operating System and version

Fedora 39, macOS Sonoma 14.4.1

@gorhill
Copy link
Member

gorhill commented Apr 23, 2024

uBO's onHeadersReceived listener is not being called when the page loads. From a quick investigation, this appears related to the browser cache. I can reproduce easily, but not when I "Clear Data..."/"Cache Web Content" beforehand.

@solsticedhiver

This comment was marked as off-topic.

@gwarser
Copy link

gwarser commented Apr 23, 2024

@gwarser
Copy link

gwarser commented Apr 23, 2024

@gwarser

This comment was marked as off-topic.

@garry-ut99
Copy link

this appears related to the browser cache. I can reproduce easily, but not when I "Clear Data..."/"Cache Web Content" beforehand.

Are you sure, because on Windows + FF 125 I can still reproduce the issue even with browser data/cache cleared (regardless of whether cleared before closing browser or before visiting example.com or even when doing both)
Or maybe there is a difference between Linux / Windows, as most likely you tested on Linux.

@stephenhawk8054

This comment was marked as off-topic.

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

No branches or pull requests

6 participants