Page 1 of 1

Re: Blocking redirects to ANOTHER domain only

Posted: Tue Nov 29, 2011 7:08 am
by dhouwn
Really only meta redirects? What about HTTP- and JS-based ones? At least for HTTP-baed ones there's NoRedirect.

Re: Blocking redirects to ANOTHER domain only

Posted: Tue Nov 29, 2011 7:24 am
by Tom T.
@ dhouwn: Excellent suggestions, thanks. But since OP asked about Meta, will try to answer that. If your add-on fills the OP's needs, very cool. :)
anonymous_user wrote:... I want to block Meta Redirects away from the *current site*, but not within the same domain. The "forbid META redirections" Noscript setting doesnt seem to work at all (I must not understand the details) and Firefox's blocker is too broad, it blocks all redirections.
What version of NoScript are you running? We're having an ongoing problem with this issue at Google searches, for which the fix was to add to the the about:config preference
noscript.forbidMetaRefresh.exceptions
the following:

Code: Select all

^https?://(?:www|encrypted)\.google\.(?:[a-z]{2,3}|[a-z]2\.[a-z]{2,3})/ t.co
For other sites: Note that META is forbidden only inside <noscript> elements -- something the site does when it realizes that its scripting is being blocked. Presumably, if the site is in your whitelist, there shouldn't be a problem. For example, if I allow -- or even temp-allow --- Google scripting (and RequestPolicy as needed), then there are no Meta blocks or warnings, the page works, and the links work, even *without* the above exception.

If you have specific sites in mind that are not in your whitelist, but you want to achieve the above, an exception could no doubt be written, or perhaps a generic one, using regular expressions. Sample site that redirects both away and within its own domain?

Re: Blocking redirects to ANOTHER domain only

Posted: Wed Nov 30, 2011 12:37 am
by therube
therube wrote:
Presumably, if the site is in your whitelist, there shouldn't be a problem.
AFAIK, that is not so.
NoScript's Forbid META redirections inside <NOSCRIPT> elements is either enabled or not, & not affected by a site's whitelisting.
No that's wrong. A whitelisted site does affect the Forbid META redirections setting.
(Now what was I thinking, & I should have known better?!)

Test page: http://grizzlyweb.com/webmaster/javascripts/examples/redirection.htm