18

After the announcement of New sign up hero for question pages I just visited a random question without logging in to Stack Overflow (using Private Window) to check how it looks. But what I am getting is:

screenshot 1

As you can see there's a blank space between question title and body. Then after visited the same question with logged in to Stack Overflow. Here is the screenshot:

screenshot

I thought it might be the bug of "New sign up hero page". So, I posted this (deleted now by a moderator). As per the comment by Adam Lear♦ I am posting this question.

I'm using Ubuntu 16.04 LTS, Firefox 57.0(64bit). With Google Chrome it works fine. I am not using any ad blocker plugins.

3
  • 1
    Working on Firefox 56.0.2 on Windows. Seems like an *nix problem as Mac has this issue too.
    – Filnor
    Commented Nov 28, 2017 at 16:04
  • @chade_ As I am not a Web developer I asked this question here. :)
    – Shashanth
    Commented Nov 28, 2017 at 16:12
  • 5
    I managed to reproduce it in Firefox without AdBlock on Windows. With AdBlock there is no space. So it's the ad that's missing (in Chrome the ad is there). Personally I prefer a space to an ad. Commented Nov 29, 2017 at 14:00

3 Answers 3

12

This seems to be caused by Firefox's tracking protection, which is enabled by default in Private Browsing mode. In particular, when I open an SO question page in Firefox Private Browsing mode and look at the developer console, it indicates that the following scripts have been blocked:

https://www.googletagservices.com/tag/js/gpt.js
https://www.google-analytics.com/analytics.js
https://secure.quantserve.com/quant.js
https://sb.scorecardresearch.com/beacon.js

Of those, at least the first one appears to be involved in the ad loading code, which includes the following minified JS (line breaks added for readability):

var k=d.createElement("script");
k.async=!0,
k.src="https://www.googletagservices.com/tag/js/gpt.js",
document.body.appendChild(k)

While I haven't examined the code in detail, the ad loader appears to be waiting for this script to load before displaying the ad — and, since it never does, the missing ad never appears.

Changing the "Use tracking protection" option to "Never" in Firefox settings makes the ad load normally even in Private Browsing mode. Conversely, I would expect that users with tracking protection set to "Always" will never see those ads even in normal browsing mode.

13

I was able to repro in Mac Firefox without ad blockers

enter image description here

Apparently, it is older bug from Everyone loves Stack Overflow? but without ad blocking involved

<div id="dfp-tlb" class="everyonelovesstackoverflow"></div>
1
  • In Google Chrome it works fine, but why not in Firefox?
    – Shashanth
    Commented Nov 28, 2017 at 15:47
6

Ilmari Karonen's answer pretty much explains things, I'm going to just flesh out some details:

We explicitly set the height on leaderboard ads to avoid re-flowing the content when the ad loads. While we don't care if users use ad blockers, we don't really go out of our way to fix any issues that may arise from their use.

Since you have more than 200 rep on Stack Overflow you have the Reduce Ads Privilege, which means you won't see leaderboard ads. When you visited the page in a Private Window as an anonymous user, we served leaderboard ads during the page visit, which it seems as though Firefox now blocks.

Since the element that the ad would be served in has an explicit size to avoid having the content jump around, what you see instead is a blank space.

Hope that clears things up!

2
  • So it's design, and not a bug, that the ads don't show up in a particular browser? That sounds ... rather dubious. Especially if you consider it from the point of view of someone who wants to buy ad views. Commented Nov 29, 2017 at 17:18
  • 1
    As I am not a (pro) Web Developer I don't have much idea about the JavaScript. I'll accept Ilmari's answer as correct one as it explains the things :) Thank you for the explanation.
    – Shashanth
    Commented Nov 29, 2017 at 17:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .