什么心什么肺| 神机妙算是什么意思| 胸闷气短是什么原因| 7月27号是什么星座| 皮肤容易晒黑是什么原因| 中筋面粉是什么粉| 本帮菜是什么意思| 过敏性鼻炎引起眼睛痒用什么药| 10月13号是什么星座| 怀孕阴道有什么变化| 电视开不了机是什么原因| 男性支原体阳性有什么症状| darling是什么意思| 牛拉稀用什么药最快| 血糖偏高吃什么食物好| 湿气重是什么原因造成的| 肚脐右边是什么器官| 叔叔的女儿叫什么| 阴囊瘙痒用什么药膏| 黄豆吃多了有什么坏处| 什么叫子宫腺肌症| 花青素有什么作用| 容易长口腔溃疡是什么原因| 有胃火口臭怎么办吃什么药| 尿酸高看什么科室最好| 心颤是什么症状| 化疗后吃什么食物最好| 正色是什么意思| 溃疡性结肠炎有什么症状| 促甲状腺激素偏高是什么意思| 拉墨绿色的大便是什么原因| 唐朝什么时候灭亡的| 龙涎香是什么| 五十而知天命是什么意思| 早孕试纸和验孕棒有什么区别| 弱水三千只取一瓢什么意思| 惊蛰是什么季节的节气| 45是什么生肖| 一个口一个坐念什么| 上半身皮肤痒什么原因| 和尚命是什么意思| 18k金是什么金| 晚黄瓜什么时候种| 3月份生日是什么星座| gala是什么意思| 颈椎退行性病变是什么意思| 梦见钓鱼是什么意思周公解梦| 气道高反应是什么意思| 什么情况下会流前列腺液| 咳嗽看什么科室| 医院红色手环代表什么| 伤口用什么消毒最好| 吃火龙果有什么好处| 什么手机最好用| 店里来猫是什么兆头| 血压低吃什么水果最好| 真菌孢子是什么| 留个念想是什么意思| 顺产和剖腹产有什么区别| 血管瘤是什么病| 处事不惊是什么意思| 查幽门螺杆菌挂什么科| 蜂胶是什么东西| 筷子在古代叫什么| 癫狂是什么意思| 深耕是什么意思| 红薯什么时候种植最好| 产后什么时候来月经正常| 木行念什么| 喉咙干痒吃什么药| 肛门口瘙痒涂什么药膏| 躯体化什么意思| mhc是什么意思| 目字旁与什么有关| 什么是躯体化| 荒淫无度是什么意思| 吧可以组什么词| 厅长是什么级别| 小说be是什么意思| 什么叫盗汗| 五脏是什么| 蝙蝠是什么变的| 经期喝什么汤| 双肺纹理增多是什么意思| 梦见被蛇追着咬是什么意思| 姜黄粉是什么做的| 吃什么补肾虚| 什么是处女| 紫米和小米什么关系| 木乐念什么| 中国四大发明是什么| 粗钢是什么| 护肝养肝吃什么药| 疮疖是什么意思| 胆汁反流性胃炎吃什么中成药| 33周岁属什么生肖| 靥什么意思| 一点是什么时辰| 犹豫不决是什么生肖| 经常手淫会有什么危害| 喝酒头晕是什么原因| 公鸡为什么会啄人| 什么好像什么造句| 1992年是什么命| 服装属于五行什么行业| 韬光养晦是什么意思| 不排卵是什么原因造成| 为什么不建议做肠镜| 假体隆胸什么材料好| 心脏跳快吃什么药好| kol是什么意思| wt什么意思| 四海扬名是什么生肖| pph是什么材料| 左边头痛什么原因| 眩晕停又叫什么| 汉城为什么改名叫首尔| 综合是什么意思| cln是什么意思| 卡路里是什么| 系带断了有什么影响| 五六点是什么时辰| 纨绔子弟什么意思| 年轻人为什么会低血压| 为什么人不会飞| 祸水什么意思| 红斑狼疮是什么原因引起的| 鲁班是干什么的| ii是什么意思| 抗坏血酸是什么| 疖子用什么药膏最好| 北京摇号什么时候开始的| 粉饼和散粉有什么区别| 血糖是什么引起的| 专车是什么意思| 笃什么意思| 什么是益生菌| 肿物是什么意思| 预防保健科是做什么的| 头发容易油是什么原因| 鬼针草长什么样| 为什么会有副乳| 亲嘴有什么好处| 清炖牛肉放什么调料| 酸菜鱼一般加什么配菜| 正连级相当于地方什么级别| 何妨是什么意思| 管科是什么专业| 去新加坡买什么| 九月九日是什么节日| 重阳节是什么生肖| 脑内小缺血灶是什么意思| 双侧肋膈角锐利是什么意思| 八方来财是什么意思| 泌乳素高有什么症状表现| 小孩嗓子疼吃什么药| 心脏缺血吃什么补的快| 成都人民公园有什么好玩的| 在什么| 感觉抑郁了去医院挂什么科| 尿液检查白细胞高是什么原因| 拔罐颜色深浅代表什么| plein是什么牌子| 6月12日什么星座| 坐骨神经痛用什么药最好| 肺炎是什么症状| 什么人不能吃海带| 没收个人全部财产是什么意思| 走路气喘是什么原因| 唐氏筛查都查些什么| 吃芒果过敏是什么症状| 天德月德是什么意思| 下眼袋大是什么原因引起的| 机不可失的下一句是什么| 什么是一线城市| 户籍地填什么| 绿萝叶子发黄是什么原因| 蠼螋对人有什么危害| 胶体金法是什么意思| 舌头白腻厚苔是什么原因| 气血不足吃什么补最快| 羟苯乙酯是什么| 困是什么意思| 排卵期有什么症状| 暴力熊是什么牌子| 淡盐水是什么水| 心脏怕什么| 蓦然回首什么意思| 梦到别人结婚是什么意思| 正月二十是什么星座| psc是什么病| 黄山毛峰是什么茶| 外贸是什么| 环形红斑是什么病| 波司登是什么档次| 面首是什么| 大姨夫是什么| 多读书有什么好处| 孕中期宫缩是什么感觉| 1月8日是什么星座| 玉米水喝了有什么好处| 红霉素软膏有什么作用| 女性潮红是什么意思| 珈字五行属什么| 家里有蜈蚣是什么原因| 白芷有什么功效| 10月11日是什么星座| 属虎的守护神是什么菩萨| 鹅吃什么食物| 标新立异是什么意思| 吃什么东西可以降压| 属羊的守护神是什么菩萨| 肾阳不足吃什么中成药| 明天叫什么日子| 基佬是什么意思| 女性检查甲功是什么病| 舌头烧灼感吃什么药| 2月12号是什么星座| 过敏性皮炎用什么药| 吃了榴莲不可以吃什么| 梦见自己被抢劫了预示什么| 为什么总是长口腔溃疡| cdc是什么意思| 孩子发烧肚子疼是什么原因| 专科有什么专业| 天门冬氨酸氨基转移酶是什么| 了凡四训讲的是什么| 东盟是什么意思| 棘人是什么意思| 蛇吃什么东西| 血精是什么原因| 处暑什么意思| 裙摆是什么| mf是什么意思| 腱鞘囊肿是什么原因| 不亚于是什么意思| 青少年嗜睡是什么原因| 空调送风模式有什么用| 罗贯中是什么朝代的| 罗贯中和施耐庵是什么关系| 苦荞茶和什么搭配最好| 7月1日是什么日子| 择日是什么意思| 吃什么排铅效果最好| 利可君片是什么药| 什么是肺部磨玻璃结节| 12月份是什么星座的| 肌肉的作用是什么| 出淤泥而不染是什么花| ii是什么意思| 晒伤了涂什么药| 郑成功是什么朝代的| 力争是什么意思| 老年人心跳过快是什么原因| sb是什么元素符号| 果子狸携带什么病毒| 椰子不能和什么一起吃| 狐惑病是什么病| 绿茶婊是什么意思| 肠胃不好吃什么药效果好| 同房干涩什么原因导致的| 甲流乙流吃什么药| prp治疗是什么意思| 怀孕肚子会有什么反应| 百度

View in English

  • Global Nav Open Menu Global Nav Close Menu
  • Apple Developer
Search
Cancel
  • Apple Developer
  • News
  • Discover
  • Design
  • Develop
  • Distribute
  • Support
  • Account
Only search within “”

Quick Links

5 Quick Links

Videos

Open Menu Close Menu
  • Collections
  • Topics
  • All Videos
  • About

More Videos

  • About
  • Transcript
  • 建设澜湄国家命运共同体,开创区域合作美好未来-干部论事-时政频道-中工网

    百度 铁树开花什么样

    Learn about the latest improvements to Safari extensions. We'll take you through new APIs, explore per-site permissions for Safari app extensions, and share how you can make sure your extensions work great in both Private Browsing and Profiles.

    Resources

    • Adding a web development tool to Safari Web Inspector
    • Developing a Safari Web Extension
    • MDN Web Docs - Web Extensions API
    • Safari Release Notes
    • Submit feedback
      • HD Video
      • SD Video

    Related Videos

    WWDC23

    • Meet Safari for spatial computing
    • Rediscover Safari developer features
    • What’s new in privacy
    • What’s new in Web Inspector

    WWDC22

    • What’s new in Safari Web Extensions

    WWDC21

    • Meet Safari Web Extensions on iOS
  • Search this video…

    ? Mellow instrumental hip-hop ? ? David Johnson: Hello, everyone.

    Welcome to "What's New in Safari Extensions." My name is David Johnson, and I'm a Safari extensions engineer here at Apple.

    Today, I'm excited to tell you about some recent developments in Safari extensions, highlighting improvements to the user experience and new features.

    First, we want to thank you for creating and sharing the over 2000 Safari extensions available on the App Store today.

    Demand for Safari extensions on iOS has been especially impressive.

    They're often among the top categories on the App Store since their introduction at WWDC21.

    Your extensions empower users to customize their browsing experience across macOS, iOS, and iPadOS.

    There are four ways to build Safari extensions: content blockers, share extensions, app extensions, and web extensions.

    Safari 17 continues to support all of these types, but the future of browser customization lies in web extensions.

    Apple is dedicated to standardizing web extensions alongside the other major browser vendors.

    This collaboration aims to improve compatibility, streamline development, and ensure a familiar experience across all browsers.

    We're working together in the W3C WebExtensions Community Group, where Apple proudly serves as a cochair.

    By connecting with other browser and extension developers to drive this standardization effort, we're building a stronger and more unified web extension ecosystem.

    Before jumping into today's topics, I'd like to share two key details about Safari web extensions.

    First, Safari 17 will continue to support both Manifest v2 and v3 web extensions.

    We'll continue to add new features to Manifest v3, so update when it makes sense for your extension.

    Second, web extensions are the best way to build extensions for Safari across platforms.

    With a single shared codebase, web extensions allow you to customize the capabilities of Safari on iOS, iPadOS, macOS, and now xrOS.

    That's right, web extension available on iOS and iPadOS will also be available on xrOS.

    Web extensions on xrOS work just like you'd expect and have the same capabilities as extensions on iOS, including the ability to inject scripts, run background content, and display popovers.

    We're excited to see how your extensions enhance the browsing experience on xrOS.

    To learn more about Safari on xrOS, check out "Meet Safari for xrOS." With those announcements out of the way, here's what we'll cover in the rest of today's session.

    First, we'll delve into some new and updated extension APIs and how they enhance the capabilities of Safari extensions.

    Then we'll cover per-site permissions for Safari app extensions, offering users more control over their browsing experience.

    And finally, we'll take a look at how to ensure compatibility with both Safari Profiles and Private Browsing.

    Up first, new extension APIs.

    Content blockers are a great way to clean up web pages, remove annoyances, and block loading of scripts.

    Content blockers use rules defined in JSON to block or hide content without needing access to any information about what websites are visited.

    Declaratively hiding content on web pages can be tricky.

    That's why content blockers now support :has() selectors.

    :has() selectors are great because they allow your content blocker to precisely target parent elements based on their children.

    In this rule example, we're hiding any elements with the class .post that also have a child element with the class .paid-promo.

    Extensions that hide webpage content, or block network requests, are some of the most popular types of extensions.

    That's why Safari continues to support you in creating innovative and effective extensions that offer a secure and private browsing experience for your users.

    If you're looking to block or modify network requests with a web extension, you should check out these updates to Declarative Net Request.

    Declarative Net Request is a powerful API that provides a way for your web extension to block and modify network requests.

    Like content blockers, your extension provides rules in a JSON format and Safari handles the rest.

    This means enhanced power efficiency, especially on battery-powered devices.

    Since these rules are declarative, your extension doesn't need access to webpages the user visits, increasing their privacy and security.

    One big update to Declarative Net Request in Safari 16.4 is that your extension can now modify request headers.

    In this example, I've defined an action that sets a custom User-Agent header for all requests made to example.com.

    Beyond setting headers, this action type can modify headers by adding new values, removing existing values, or even removing headers entirely from HTTP requests.

    Modifying network requests is a powerful tool, and there are some key points to keep in mind.

    First, you must declare the declarativeNetRequestWithHostAccess permission in the manifest.

    In Safari 16.4, this permission is now also required for redirect actions.

    Your extension must also be granted per-site permissions for any modify headers or redirect actions to be applied.

    This ensures that the user has control over their data on a site-by-site basis.

    By keeping these considerations in mind, you can create powerful and privacy-friendly content-blocking extensions that provide a tailored experience for your users.

    If you're building an extension that uses Declarative Net Request, you may want to let your users know just how many requests it has blocked.

    Using the new declarativeNetRequest.setExtensionActionOptions API, you can configure the badge text to display action counts, such as the number of blocked loads.

    In this example, we set the displayActionCountAsBadgeText option to true, which is currently the only option for this API.

    Your extension badge will update automatically based on the actions taken.

    This allows your users to easily monitor the extension's activity and effectiveness, all while keeping their browsing history private.

    Now I'll cover an update to the scripting API that gives you more control over the behavior of your extension.

    With the registerContentScript set of APIs, you can create content scripts that can be registered, updated, or removed programmatically.

    This means that you can target specific pages or conditions to apply to content scripts.

    In this example, I'm registering a script to be injected onto pages that match webkit.org.

    This script registration will also persist across sessions.

    This new API complements the static content scripts defined in the extension manifest, giving you greater flexibility in managing content scripts and enabling you to create more advanced features for your extensions.

    Safari 16.4 also brings a new storage area to web extensions: the session storage area.

    Storing and retrieving data from session storage uses the same familiar functions as other storage areas.

    This API allows you to store data in memory for the duration of your browser session, providing a fast and efficient way to access data between nonpersistent background page loads.

    Unlike local storage, session storage is not persisted to disk and it's cleared when Safari quits.

    This makes session storage particularly useful for storing sensitive or security-related data, such as decryption keys or authentication tokens, that should not be stored in local storage.

    Finally, we know that making sure your extension has all the right icon sizes for different UI elements is a chore.

    That's why starting in Safari 16.4, you can now create a single SVG icon that looks beautiful at any size.

    Safari will take care of scaling your extension's icon sharply, letting you focus on everything else.

    Those API updates are just some of the improvements to Safari extensions this year.

    Now let's talk about Safari app extensions and per-site permissions.

    If you're already familiar with per-site permissions from web extensions, they work the same way for app extensions.

    Users are able to grant extensions access to websites as they browse, providing for better privacy and control.

    When an extension is first turned on, it won't have access to any sites that the user visits.

    The first time an extension tries to access the page, Safari will badge the extension's toolbar item alerting the user that the extension wants access to the current page.

    When the user clicks on that toolbar item, they'll be shown information about what access the extension will have, and be given the option to Allow for One Day, or Always Allow.

    When granted permission, the extension's toolbar item will be tinted to show that the extension has access to the current page.

    Anyone that upgrades to Safari 17 and already has Safari app extensions turned on will have all permissions migrated for those extensions.

    They'll also be shown a banner giving them the option to increase their privacy.

    If Ask for Each Website is chosen, all Safari app extension permissions will be reset, and your users will be able to grant your extension access to each site as they visit.

    There are no new APIs to adopt to support this change in Safari 17; however, take some time to review your extension's assumptions and test how your extensions behave in Safari 17.

    Your users will have full control over the websites every Safari app extension can access.

    Your extension will automatically have access to sites when permission is granted by the user.

    However, permissions can be granted or revoked at any time.

    Toolbar items are now shown by default for all extensions.

    Take a look at how your extension icon appears in Safari and supply a PDF vector icon that can be tinted appropriately.

    Finally, let's talk about updates to how extensions work in both Profiles and Private Browsing.

    In Safari 17, users will be able to control which extensions have access to their Private Browsing windows and tabs without needing to turn off the extension in other browsing contexts.

    Extensions that inject scripts, or can read information about the pages a user visits, are turned off by default.

    However, extensions that don't access content, like content blockers, are automatically allowed in Private Browsing because there aren't any additional privacy concerns.

    Here's the updated Extensions pane in Safari settings on macOS and there are similar updates on iOS.

    There's a new option to allow this extension in Private Browsing.

    For extensions that are turned on, it's one click in Safari settings to allow that extension access to Private Browsing as well.

    Profiles are new in Safari this year.

    They're a way to keep browsing data separated.

    Profiles contain separate history, cookies, and website data.

    Users can also choose which extensions they want to turn on per profile.

    This includes new tab page extensions.

    And of course, all these settings sync across all of a user's iPhone, iPad, and Macs through iCloud.

    The Extensions pane in Safari settings has also been updated to list the profiles where an extension is active.

    Here you can see that the Sea Creator extension is active in both Work and School profiles.

    When an extension is turned on in a profile, it is an entirely new instance of that extension.

    This means each instance will have a different UUID, background page, and storage.

    However, per-site permissions are shared across profiles.

    That means your users only need to grant your extension access once.

    When running in a profile, an extension only has access to the windows, tabs, and other data related to that profile.

    If your extension communicates with a native host app, make sure that your app expects to receive messages from multiple profiles and respects the separation of data across those profiles.

    When your app receives a call to beginRequest(with context:), decode the userInfo dictionary.

    If your extension is active in a profile, there will be a profileIdentifier value for the key SFExtensionProfileKey.

    Since extensions have unique instances per profile, it's possible to inspect their background content separately.

    From the Develop menu in Safari 17, you can dive into the Web Extension Background Content menu item and see the background pages and service workers grouped by extension.

    Each extension will list its inspectable content per profile.

    To learn more about the improvements to Safari developer features this year, check out "What's new in Web Inspector" and "Rediscover Safari developer features." In summary, Safari is committed to standardizing web extensions and providing you with new APIs to create innovative and effective extensions.

    We'd love for you to join in the discussion and help shape the future of web extensions by participating in the WECG.

    With per-site permissions for app extensions and support for new features like :has() selectors, you can create extensions that offer a secure and private browsing experience for your users.

    Don't forget to update your extensions to take advantage of these new capabilities and ensure they work well with both Profiles and Private Browsing.

    And finally, provide feedback through Feedback Assistant as you test your extensions in Safari 17.

    Thank you for listening, and have a great rest of WWDC.

    ?

Developer Footer

  • Videos
  • WWDC23
  • What’s new in Safari extensions
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • App Extensions
    • App Store
    • Audio & Video
    • Augmented Reality
    • Design
    • Distribution
    • Education
    • Fonts
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning
    • Open Source
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Tutorials
    • Downloads
    • Forums
    • Videos
    Open Menu Close Menu
    • Support Articles
    • Contact Us
    • Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Get the Apple Developer app.
    Copyright ? 2025 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines
    匹维溴铵片治什么病 识大体是什么意思 清款是什么意思 万力什么字 大便有点绿色是什么原因
    睡觉嗓子干是什么原因 1952属什么生肖 傀儡什么意思 女生下面出血但不是月经为什么 失眠吃什么
    七月二十九是什么星座 青蟹什么季节吃最好 晚饭吃什么好 阴道发炎用什么药 pdn是什么意思
    脸上过敏是什么症状 鱼什么而什么 王力是什么字 唇炎看什么科室 生育能力检查挂什么科
    如来佛祖和释迦牟尼是什么关系hcv9jop7ns5r.cn 信阳毛尖是什么茶hcv9jop4ns1r.cn 判处死刑缓期二年执行是什么意思hcv7jop4ns5r.cn coach什么意思hcv9jop2ns6r.cn 妙手回春是什么意思hcv8jop9ns0r.cn
    25岁属什么hcv9jop2ns2r.cn 榴莲为什么会苦hcv7jop6ns4r.cn 唐僧肉是什么意思hcv7jop6ns7r.cn 软饮是什么意思cl108k.com hm是什么hcv8jop5ns1r.cn
    缺铁性贫血吃什么补得快hcv9jop0ns7r.cn 1929年属什么hcv8jop9ns1r.cn 生姜有什么功效hcv8jop4ns5r.cn 64年属什么生肖hcv8jop5ns2r.cn 山茱萸有什么功效hcv8jop6ns9r.cn
    房性早搏吃什么药最好hcv8jop4ns8r.cn 4.8什么星座hcv7jop5ns6r.cn 程咬金是什么意思hcv8jop2ns2r.cn 什么病不能吃豌豆hcv8jop9ns2r.cn 下午3点是什么时辰hcv9jop3ns0r.cn
    百度