Ublock: Blocking meta refresh redirects

Created on 28 Dec 2017  路  8Comments  路  Source: gorhill/uBlock

This is a dircect followup of #226 as the main issue is not solved.

Describe the issue

I have javascript and cookies fully disabled. On some pages I get now a tracking redirect via meta refresh. This is no popunder so it is not addressed by this filter.

For example:

google.com does redirect to a tracking page where all links are converted to first link to google for redirect to other pages.

twitter does a endless redirect expecting a cookie for tracking is set (what I will never allow for twitter!) to mobile.twitter.com which shows nothing without javascript (What I also will never allow for twitter!)

One or more specific URLs where the issue occurs

Your settings

  • OS/version: Linux
  • Browser/version: Firefox 57.0.1
  • uBlock Origin version: 1.14.22
Your filter lists

Several, the issue is not related to existing filters.

Your custom filters (if any)
www.golem.de###gts-clip > div > .gsap

www.neues-deutschland.de##.Paywall

google.com##^meta[http-equiv="refresh"]

The last was a try to block it but failed, what means that I still see the tracking redirect.

Most helpful comment

Works pretty well, thanks.

google.com##^meta[http-equiv="refresh"]
google.com##^noscript > style
twitter.com##^meta[http-equiv="refresh"]

All 8 comments

google.com##^meta[http-equiv="refresh"]

The last work only on my local build, I did not commit the code yet.

Fixed with a9f68fe02f40, will be in 1.14.23b3, the filter google.com##^meta[http-equiv="refresh"] should work. This requires Firefox 57+.

Works pretty well, thanks.

google.com##^meta[http-equiv="refresh"]
google.com##^noscript > style
twitter.com##^meta[http-equiv="refresh"]

When I fixed #3069, the original intention was to allow to inject scriptlets before any other script tags on a page, thus removing the issue of potential race condition which could cause the inject scriptlets to not perform their duty.

While I worked with the new Firefox 57 API to fix #3069, I realized that it would also be great to be able to support element removal using cosmetic filter-like syntax _before_ the browser can even parse the source, since with #3069 the response data was already being modified.

However there was no issue opened for such feature. So I will use the feature request here _a posteriori_ in the release notes as the rationale for the new HTML filtering feature.

how do i block meta refresh in chrome? i dont care if i have to block every single meta tag temporarily, im getting so frustrated with twitter refreshing on any cache or archive, im raging...
is it not possible to block meta refresh on chrome whatsoever? that seems to be the consensus online, i've been screaming for 2 hours trying to just load cache:https://twitter.com/ without being redirected to fucking mobile, do you have any suggestions? i guess im going to setup a local web proxy and regex replace the traffic or just download firefox.. but id like to do it with filter on chrome

is it not possible to block meta refresh on chrome whatsoever?

For twitter, the meta http-equiv="refresh" tag is inside a noscript tag. So just disable noscript spoofing for twitter.com?

just disable noscript spoofing

how do i do that?
i tried adding the rule
no-strict-blocking: twitter.com true
but it still redirects

My bad, I got confused and thought I was commenting on a uMatrix issue, somehow.

So you are blocking javascript with Chrome's own javascript blocker? If so, you could instead block javascript on twitter with uBO, and enable javascript on twitter in Chrome settings. I tried it and it works fine for me, there was no redirection -- the noscript tags are no spoofed by uBO.

Was this page helpful?
0 / 5 - 0 ratings