## Extension files Extensions contain different files, depending on the functionality provided. The following are some of the most frequently used files: ### The manifest The extension's [manifest](https://developer.chrome.com/docs/extensions/mv3/manifest/) is the only required file that **must** have a specific file name: `manifest.json` . It also has to be located in the extension's root directory. The manifest records important metadata, defines resources, declares permissions, and identifies which files to run in the background and on the page. ### The service worker The extension [service worker](https://developer.chrome.com/docs/extensions/mv3/service_workers/) handles and listens for browser events. There are many types of events, such as navigating to a new page, removing a bookmark, or closing a tab. It can use all the [Chrome APIs](https://developer.chrome.com/docs/extensions/reference/), but it cannot interact directly with the content of web pages; that’s the job of content scripts. ### Content scripts [Content scripts](https://developer.chrome.com/docs/extensions/mv3/content_scripts/) execute Javascript in the context of a web page. They can also read and modify the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model) of the pages they're injected into. Content Scripts can only use a subset of the [Chrome APIs](https://developer.chrome.com/docs/extensions/reference/) but can indirectly access the rest by exchanging messages with the extension service worker. ### The popup and other pages An extension can include various HTML files, such as a [popup](https://developer.chrome.com/docs/extensions/mv3/user_interface/#popup), an [options page](https://developer.chrome.com/docs/extensions/mv3/options/), and [other HTML pages](https://developer.chrome.com/docs/extensions/mv3/architecture-overview/#html-files). All these pages have access to [Chrome APIs](https://developer.chrome.com/docs/extensions/reference/). Chrome developer documentation: [https://developer.chrome.com/docs/extensions/](https://developer.chrome.com/docs/extensions/) Manifest file reference: [https://developer.chrome.com/docs/extensions/mv3/manifest/](https://developer.chrome.com/docs/extensions/mv3/manifest/) Chrome extension APIs reference: [https://developer.chrome.com/docs/extensions/reference/](https://developer.chrome.com/docs/extensions/reference/) Service worker primer: [https://developers.google.com/web/fundamentals/primers/service-workers](https://developers.google.com/web/fundamentals/primers/service-workers) MDN service worker registration notifications reference: [https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification)