# How Google Ads Detect Which Web Page You Are Viewing

> A method for web browsers to identify the correct webpage address to show relevant advertisements, even when the ad code is hidden inside a frame.

- **Patent:** US 7136875
- **Original title:** Serving advertisements based on content
- **Owner:** Google LLC
- **Granted:** 2006
- **Status:** Public domain (expired)
- **Times cited:** 427
- **Field:** consumer_electronics, software, ecommerce

## What it does

This patent describes a way for an ad-serving system to figure out exactly which webpage a user is looking at so it can show relevant ads. When a website loads, it often includes small pieces of code (like JavaScript) that fetch ads. The problem is that these ads might be inside a sub-window called a frame, which can confuse the ad server about the actual page URL. This patent claims a method where the browser runs a comparison check: it looks at the location of the ad code and compares it to the main page URL. If they match, it uses that address; if they don't match or are blocked by security rules, it falls back to the 'referrer' link to find the true page address.

## What it does NOT cover

- Does not cover the actual logic used to select which specific ad to display based on the page content.
- Does not cover methods of tracking user behavior across different websites or domains.
- Does not cover server-side ad insertion where the ad is baked into the HTML before the page reaches the browser.
- Does not cover non-browser applications that do not use URL-based document identifiers.

## The clever bit

The innovation is the fallback logic: if the script cannot directly read the main page URL due to browser security restrictions (like cross-origin policies), it intelligently uses the 'referrer' header as a reliable secondary source to identify the page context.

## Real-world examples

1. Google AdSense ad units embedded on blogs and news websites
2. Third-party ad networks using JavaScript tags to scan page content

## Why it matters

This technology was fundamental to the growth of Google's AdSense program, which allowed publishers to easily monetize their websites. By solving the technical hurdle of 'frame-busting' or identifying content within complex web layouts, it ensured that advertisers could reliably target their ads to the specific content the user was reading. This helped turn the internet into a massive, ad-supported ecosystem.

## Frequently asked questions

### What does How Google Ads Detect Which Web Page You Are Viewing cover?

A method for web browsers to identify the correct webpage address to show relevant advertisements, even when the ad code is hidden inside a frame.

### Who owns patent US 7136875?

Google LLC owns this patent, granted in 2006.

### When does this patent expire?

This patent is expected to expire on November 14, 2026, when the invention enters the public domain.

### What is patent US 7136875 cited by?

This patent has been cited by 427 later patents that build on its ideas.

### What problem does this patent solve?

This technology was fundamental to the growth of Google's AdSense program, which allowed publishers to easily monetize their websites. By solving the technical hurdle of 'frame-busting' or identifying content within complex web layouts, it ensured that advertisers could reliably target their ads to the specific content the user was reading. This helped turn the internet into a massive, ad-supported ecosystem.

### What does this patent NOT cover?

Does not cover the actual logic used to select which specific ad to display based on the page content.

**Full plain-English explainer:** https://patentbrief.org/patent/us/7136875/google-maps

**Original patent:** https://patents.google.com/patent/US7136875

---

_Source: PatentBrief — https://patentbrief.org. Patent facts are from public records; the plain-English explanation is PatentBrief's._
