history

The history permission allows an extension to interact with the browser's record of visited pages.

What it does

  • Read: Search the browsing history for specific URLs or text.
  • Add: Add new entries to the browser's history. This is rarely used but can be done.
  • Delete: Remove specific URLs from the history or delete a range of history items.
  • Listen: Be notified when a page has been visited or when an item has been removed from history.

When to use it

Use this permission for extensions that provide features related to browsing history, such as enhanced search, data visualization, or synchronization with other services.

Examples:

  • An extension that provides a "vertical" or "tree-style" history view.
  • A productivity tool that visualizes how much time is spent on different websites.
  • An extension that syncs browsing history with a mobile device (via an external service).
  • A "search my history" extension with more advanced filtering capabilities.

Manifest Declaration

This permission triggers a strong warning on installation.

{
  "name": "My History Extension",
  "version": "1.0",
  "manifest_version": 3,
  "permissions": [
    "history"
  ],
  "action": {}
}

Security & Privacy

Why is it risky?

Your browsing history is a detailed record of your life online. It can reveal your interests, medical conditions, financial status, political views, and much more. This permission gives an extension full access to read and even delete your entire browsing history.

A malicious extension could use this to:

  • Build a detailed profile of you to sell to advertisers or data brokers.
  • Discover which banks, social media sites, or email providers you use to target you for phishing attacks.
  • Blackmail you with sensitive or embarrassing information found in your history.

Grant this permission with extreme caution, only to extensions you trust completely.

API Usage Example

This example searches the user's history for visits to "developer.chrome.com" in the last 7 days.

// background.js

chrome.action.onClicked.addListener(() => {
  searchChromeDevHistory();
});

function searchChromeDevHistory() {
  const sevenDaysAgo = new Date().getTime() - (7 * 24 * 60 * 60 * 1000);

  chrome.history.search({
    text: 'developer.chrome.com', // Search for this text in URL and title
    startTime: sevenDaysAgo,
    maxResults: 10
  }, (historyItems) => {
    if (historyItems.length > 0) {
      console.log('Found recent visits:');
      historyItems.forEach(item => {
        console.log(`- ${item.title} (${item.url})`);
      });
    } else {
      console.log('No recent visits to developer.chrome.com found.');
    }
  });
}

Extensions with the history permission

Here are some popular browser extensions that use the "history" permission. To explore more, try our Advanced search.

Permission Metrics

Popularity

Security Risk


Usage by Platform