24

Recently somehow I ended up on http://www.google.com/blank.html

Does anyone have an idea why this page exists and what might it be useful for?

2 Answers 2

25

Google has some URLs designed for special purposes, such as:

http://www.google.com/blank.html

and

http://clients3.google.com/generate_204

These are designed to facilitate detection of 'captive portals': that is, when you sign on to a wifi network at a hotel or airport, you (or an automated process) can go check these pages. If they return anything other than the intended result (i.e. if blank.html contains anything other than a blank page) then the process that's checking it knows that something is intercepting your web requests -- most likely a portal page demanding payment.

Example of its use, (WifiWatchdogStateMachine.java):

private static final String DEFAULT_WALLED_GARDEN_URL =
        "http://clients3.google.com/generate_204";
    /**
 * DNS based detection techniques do not work at all hotspots. The one sure
 * way to check a walled garden is to see if a URL fetch on a known address
 * fetches the data we expect
 */
private boolean isWalledGardenConnection() {
    HttpURLConnection urlConnection = null;
    try {
        URL url = new URL(mWalledGardenUrl);
        urlConnection = (HttpURLConnection) url.openConnection();
        urlConnection.setInstanceFollowRedirects(false);
        urlConnection.setConnectTimeout(WALLED_GARDEN_SOCKET_TIMEOUT_MS);
        urlConnection.setReadTimeout(WALLED_GARDEN_SOCKET_TIMEOUT_MS);
        urlConnection.setUseCaches(false);
        urlConnection.getInputStream();
        // We got a valid response, but not from the real google
        return urlConnection.getResponseCode() != 204;
    } catch (IOException e) {
        if (DBG) {
            log("Walled garden check - probably not a portal: exception " + e);
        }
        return false;
    } finally {
        if (urlConnection != null) {
            urlConnection.disconnect();
        }
    }
}

Further discussion about this can be found on this thread.

3
  • 6
    That is a good use of blank.html, and one I would not have thought of. However, most people I know are using google.com/blank.html to generate a bright white, blank screen on phones and tablets to use as a flashlight. I don't know if that use is in Google's intents for the page, but it's popular for that purpose. Commented Jun 11, 2012 at 17:54
  • 1
    I love(hate) that in this day and age the easiest way to get a white screen is to ask google for one!
    – Alex
    Commented May 8, 2015 at 3:45
  • Could save a web page locally or use one of the 2MB+ screen light apps :) @Alex
    – tgkprog
    Commented Dec 5, 2016 at 19:21
8

This URL is used by Google for multiple purposes, not just to facilitate detection of 'captive portals'.

I discovered that it is used in the case described below:

The Google blank.html referer is used when an image appears in the web-search SERP, and the user clicks on that image. this causes Google to display a black-background page with a larger view of the image thumbnail, and this (non-secured, i.e. HTTP not HTTPS) page contains some Google JavaScript/Ajax code that causes the original (full-size) image to be loaded by the browser, with a referer set to http://www.google.com/blank.html (or some localized variations, e.g. http://www.google.ca/blank.html etc).

Note that this different from what happens if the user does an image search. in that case, the image SERP is secured (HTTPS), and when the user clicks on a thumbnail image, google display the image scaled-up on black background, and the image SERP page contains some Google JavaScript/Ajax code that causes the original (full-size) image to be loaded by the browser, with a empty referer (not blank.html).

1
  • 3
    Sorry for deleting your previous answer. Thank you for persevering. Commented Jun 4, 2013 at 20:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.