{"id":78861,"date":"2025-04-22T11:32:49","date_gmt":"2025-04-22T18:32:49","guid":{"rendered":"https:\/\/blog.mozilla.org\/?p=78861"},"modified":"2025-06-23T16:04:38","modified_gmt":"2025-06-23T23:04:38","slug":"ai-link-previews-firefox","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/","title":{"rendered":"Exploring on-device AI link previews in Firefox"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"691\" src=\"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583-1024x691.png\" alt=\"screenshot of link preview of a mozilla blog post\" class=\"wp-image-78872\" srcset=\"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583-1024x691.png 1024w, https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583-300x203.png 300w, https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583-768x518.png 768w, https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583-1536x1037.png 1536w, https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583-1000x675.png 1000w, https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583.png 2000w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Ever opened a bunch of tabs only to realize none of them have what you need? Or felt like you&#8217;re missing something valuable in a maze of hyperlinks? In Firefox Labs 138, we introduced an <a href=\"https:\/\/connect.mozilla.org\/t5\/discussions\/try-out-link-previews-on-firefox-labs\/td-p\/92012\">optional experimental feature<\/a> to enhance your browsing experience by showing a quick snapshot of what\u2019s behind a link before you open it. This post provides some technical details of this early exploration for the community to help shape this feature and set the stage for deeper discussions into specific areas like AI models.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Interaction<\/h3>\n\n\n\n<p>To activate a Link Preview, hover over a link and press Shift (\u21e7) plus Alt (Option \u2325 on macOS), and a card appears including the title, description, image, reading time, and 3 key points generated by an on-device language model. This is built on top of the Firefox behavior to show the URL when over a link, so it also works when links are focused with the keyboard. We picked this keyboard shortcut to try avoiding conflicts with common shortcuts, e.g., opening tabs or Windows menus. <a href=\"https:\/\/connect.mozilla.org\/t5\/discussions\/try-out-link-previews-on-firefox-labs\/td-p\/92012\">Let us know:<\/a> do you prefer some keyboard shortcut or potentially other triggers like long press, context menu, or maybe hover with delay?<\/p>\n\n\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"640\" height=\"480\" src=\"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-keyboard.gif\" alt=\"animation showing shift+alt keyboard presses triggering link preview\" class=\"wp-image-78862\"\/><\/figure><\/div>\n\n\n<p>The card appears in a panel separate from the page, allowing it to extend past the edges of the window. This helps us position the link within the card near your mouse cursor, making it convenient to visit the previewed page, while also reinforcing that this comes from Firefox and not the page. We\u2019re also exploring the possibility of making it part of the page, allowing them to scroll together or more separately, such as a persistent space to gather multiple previews for cross-referencing or subsequent actions. <a href=\"https:\/\/connect.mozilla.org\/t5\/discussions\/try-out-link-previews-on-firefox-labs\/td-p\/92012\">Let us know:<\/a> which approaches better support your browsing workflows?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Page fetching and extraction<\/h3>\n\n\n\n<p>This initial implementation uses credentialless HTTPS requests to retrieve a page&#8217;s HTML and parses it without actually loading the page or or executing scripts. While we don\u2019t currently send cookies, we do send a custom x-firefox-ai header allowing website authors to potentially decide what content can be previewed. <a href=\"https:\/\/connect.mozilla.org\/t5\/discussions\/try-out-link-previews-on-firefox-labs\/td-p\/92012\">Let us know:<\/a> would you want previews of content requiring login, perhaps with a risk of accidentally changing related logged in state?<br><\/p>\n\n\n\n<p>With the parsed page, we look for metadata, such as <a href=\"https:\/\/developer.mozilla.org\/docs\/Learn_web_development\/Core\/Structuring_content\/Webpage_metadata#other_types_of_metadata\">Open Graph tags<\/a>, which are commonly used for social media link sharing, to display the title, description, and image. We also reuse Firefox\u2019s <a href=\"https:\/\/support.mozilla.org\/kb\/firefox-reader-view-clutter-free-web-pages\">Reader View<\/a> capabilities for extracting reading time and the main article content to generate key points. Improvements to page parsing capabilities can enhance both Reader View and Link Previews. <a href=\"https:\/\/connect.mozilla.org\/t5\/discussions\/try-out-link-previews-on-firefox-labs\/td-p\/92012\">Let us know:<\/a> which sites you find the feature useful and on which it might pull the wrong information.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Key points, locally generated&nbsp;<\/h3>\n\n\n\n<p>To ensure user privacy, we run inference on-device with Reader View\u2019s content. This is currently powered by <a href=\"https:\/\/github.com\/ngxson\/wllama\">wllama (WebAssembly llama.cpp)<\/a> with <a href=\"https:\/\/github.com\/huggingface\/smollm\/tree\/main\/text\">SmolLM2-360M from HuggingFace<\/a>, chosen based on our evaluation of performance, relevance, consistency, etc. Testing so far shows most people can see the first key point within 4 seconds and each additional point within a second, so <a href=\"https:\/\/connect.mozilla.org\/t5\/discussions\/try-out-link-previews-on-firefox-labs\/td-p\/92012\">let us know:<\/a> how that feels for you and if you\u2019d want it faster or smarter.<\/p>\n\n\n\n<p>There are various optimizations to speed things up, such as downloading the AI model (369MB) when you first enable the feature in Firefox Labs, as well as limiting how much content is provided to the model to match up with the intent of a preview. We also use pre-processing and post-processing heuristics that are English-focused, but some in the community have already configured the language limiting pref from \u201cen\u201d and provided helpful feedback that this model can work for other languages too.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Next steps<\/h3>\n\n\n\n<p>We\u2019re actively working on improving support for multiple languages, key points quality and length, and general polish to the feature capability and user experience as well as exploring how to bring this to Android. We invite you to try Link Preview and <a href=\"https:\/\/connect.mozilla.org\/t5\/discussions\/try-out-link-previews-on-firefox-labs\/td-p\/92012\">look forward to your feedback<\/a> in enhancing how Firefox helps users accomplish more on the web. You can also chat with us on <a href=\"https:\/\/discord.gg\/Jmmq9mGwy7\">AI@Mozilla discord #firefox-ai<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever opened a bunch of tabs only to realize none of them have what you need? Or felt like you&#8217;re missing something valuable in a maze of hyperlinks? In Firefox Labs 138, we introduced an optional experimental feature to enhance your browsing experience by showing a quick snapshot of what\u2019s behind a link before you [&hellip;]<\/p>\n","protected":false},"author":468,"featured_media":78872,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[464274,464303],"tags":[317823,464204,847],"coauthors":[464286],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Exploring on-device AI link previews in Firefox<\/title>\n<meta name=\"description\" content=\"Learn details of privacy-focused feature providing quick snapshots of webpages and shape its development by joining the community discussion.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/\",\"url\":\"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/\",\"name\":\"Exploring on-device AI link previews in Firefox\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583.png\",\"datePublished\":\"2025-04-22T18:32:49+00:00\",\"dateModified\":\"2025-06-23T23:04:38+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/f0d1ffc05f8090c7658717aefa55f502\"},\"description\":\"Learn details of privacy-focused feature providing quick snapshots of webpages and shape its development by joining the community discussion.\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/#primaryimage\",\"url\":\"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583.png\",\"contentUrl\":\"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583.png\",\"width\":2000,\"height\":1350,\"caption\":\"screenshot of link preview of a mozilla blog post\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exploring on-device AI link previews in Firefox\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/en\/\",\"name\":\"The Mozilla Blog\",\"description\":\"News and Updates about Mozilla\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/f0d1ffc05f8090c7658717aefa55f502\",\"name\":\"Ed Lee\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/image\/da6b3343423ebc4e3c50b877c255506a\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d4d56808e420c95ff12a4e7372579293?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d4d56808e420c95ff12a4e7372579293?s=96&d=mm&r=g\",\"caption\":\"Ed Lee\"},\"description\":\"Ed hacks on all sorts of Firefox features including Generative AI, Onboarding, Firefox Home and even older Content Services (Tiles, UP, Interest Dashboard, Subscribe2Web) and Labs (Sync, Account Manager, Prospector). He also helps out with neat Firefox features like the Awesome Bar to help users quickly get to what they want. (Or maybe it's that Ed wants to get quickly to news about Mario and Nintendo games, and everyone benefits!)\",\"url\":\"https:\/\/blog.mozilla.org\/en\/author\/eleemozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Exploring on-device AI link previews in Firefox","description":"Learn details of privacy-focused feature providing quick snapshots of webpages and shape its development by joining the community discussion.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/","url":"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/","name":"Exploring on-device AI link previews in Firefox","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/#primaryimage"},"image":{"@id":"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583.png","datePublished":"2025-04-22T18:32:49+00:00","dateModified":"2025-06-23T23:04:38+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/f0d1ffc05f8090c7658717aefa55f502"},"description":"Learn details of privacy-focused feature providing quick snapshots of webpages and shape its development by joining the community discussion.","breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/#primaryimage","url":"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583.png","contentUrl":"https:\/\/blog.mozilla.org\/wp-content\/blogs.dir\/278\/files\/2025\/04\/link-preview-mozilla-blog-e1745348893583.png","width":2000,"height":1350,"caption":"screenshot of link preview of a mozilla blog post"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/en\/firefox\/firefox-ai\/ai-link-previews-firefox\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/en\/"},{"@type":"ListItem","position":2,"name":"Exploring on-device AI link previews in Firefox"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/en\/#website","url":"https:\/\/blog.mozilla.org\/en\/","name":"The Mozilla Blog","description":"News and Updates about Mozilla","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/f0d1ffc05f8090c7658717aefa55f502","name":"Ed Lee","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/en\/#\/schema\/person\/image\/da6b3343423ebc4e3c50b877c255506a","url":"https:\/\/secure.gravatar.com\/avatar\/d4d56808e420c95ff12a4e7372579293?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d4d56808e420c95ff12a4e7372579293?s=96&d=mm&r=g","caption":"Ed Lee"},"description":"Ed hacks on all sorts of Firefox features including Generative AI, Onboarding, Firefox Home and even older Content Services (Tiles, UP, Interest Dashboard, Subscribe2Web) and Labs (Sync, Account Manager, Prospector). He also helps out with neat Firefox features like the Awesome Bar to help users quickly get to what they want. (Or maybe it's that Ed wants to get quickly to news about Mario and Nintendo games, and everyone benefits!)","url":"https:\/\/blog.mozilla.org\/en\/author\/eleemozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/posts\/78861"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/users\/468"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/comments?post=78861"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/posts\/78861\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/media\/78872"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/media?parent=78861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/categories?post=78861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/tags?post=78861"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mozilla.org\/en\/wp-json\/wp\/v2\/coauthors?post=78861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}