I've just found a weird problem - NoScript causes a simple xhtml page I wrote to display duplicate content in Firefox 5 (Linux), as though all of the divs are present twice in different locations on the page.
There is no javascript in the page, just xhtml and css. When I disabled every extension except NoScript the problem persisted. When I disabled NoScript - but left all other extensions active - the problem disappeared and the page viewed correctly.
When I enabled all extensions, and allowed javascript via NoScript, the problem also disappeared - even though the page contains no javascript. The page works fine in Opera and Chromium, with or without javascript enabled. The page url is 'http://lorem-ipsum.webege.com/index.html'. I'm baffled, any help appreciated.
Noscript causes duplicate content
Noscript causes duplicate content
Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0
Re: Noscript causes duplicate content
(Allow/disallow webege.com to see the difference. I actually like the "wrong" page better. The word scriptless comes to mind.)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110706 Firefox/5.0 SeaMonkey/2.2
Re: Noscript causes duplicate content
here's a distillation, must be loaded from http: not file:
Code: Select all
<div style="position:absolute;top:100">
<a href=""><span style="position: absolute">dupe</span></a>
</div>
Mozilla/5.0 (Windows NT 5.1; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
Re: Noscript causes duplicate content
@therube
Ah ok, so it's not a bug it's a feature
I changed the noscript.jsredirectIgnore about:config preference to 'true' and now the page displays properly. Thanks for the 'scriptless' pointer.
Ah ok, so it's not a bug it's a feature

I changed the noscript.jsredirectIgnore about:config preference to 'true' and now the page displays properly. Thanks for the 'scriptless' pointer.
Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0
Re: Noscript causes duplicate content
hasVisibleLinks thinks the link is invisible and so detectJSRedirects clones it, to make it visible.Guest wrote:I changed the noscript.jsredirectIgnore about:config preference to 'true' and now the page displays properly.
Code: Select all
if (!hasVisibleLinks && (document.links[0] || document.forms[0])) {
let links = document.links;
for (let j = 0, len = links.length; j < len; j++) {
let l = links[j];
if (!(l.href && l.href.indexOf("http") === 0)) continue;
l = body.appendChild(l.cloneNode(true));
l.style.visibility = "visible";
l.style.display = "block";
seen.push(l.href);
}
Mozilla/5.0 (Windows NT 5.1; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
Re: Noscript causes duplicate content
@ al_9x
Thanks for the clarification. So maybe it is a bug after all, because the links in my page are not invisible - but they do contain hidden spans that I display on css :hover action as part of the link styling. It's all standards-compliant css behaviour, but it seems NoScript's detection method isn't smart enough to tell the difference.
Thanks for the clarification. So maybe it is a bug after all, because the links in my page are not invisible - but they do contain hidden spans that I display on css :hover action as part of the link styling. It's all standards-compliant css behaviour, but it seems NoScript's detection method isn't smart enough to tell the difference.
Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Noscript causes duplicate content
Fixed in latest development build.
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
Re: Noscript causes duplicate content
verified
Mozilla/5.0 (Windows NT 5.1; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
- Giorgio Maone
- Site Admin
- Posts: 9524
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Noscript causes duplicate content
NoScript's method was too smart, using size rather than CSS computed styles to tell the differences.Guest wrote:NoScript's detection method isn't smart enough to tell the difference.
Unfortunately, Gecko doesn't report size correctly (or at least all your anchors are reported as collapsed to 0 width and height), so I had to make NoScript dumber and just check for display and visibility of the link and its ancestors.
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0