Safari:平台历史、WebKit与受支持环境
保留1至7/6.1历史内容,纠正Windows支持和发布阶段混写。
学完这一章,你能够
- 保留1至7/6.1历史内容,纠正Windows支持和发布阶段混写。
- 保留1至7/6.1历史内容,纠正Windows支持和发布阶段混写。
平台与发行阶段
Safari在2003年初宣布、随后发布正式版本,后续随苹果系统发展。Safari7/6.1的开发者宣布与2013年十月正式发行是不同节点,不把两个时间写成同一次发布。
本章原始配图待补,保持在对应历史/统计说明段落后;自有运行图不冒充原图采集成功。
苹果不再向Windows提供Safari更新,Windows的最后分支为5.1.7且已经过时;不能保留Safari支持Windows的旧描述却不解释历史。今天的支持系统要求以相应苹果产品资料为准。
保留历史技术地图
逐版表包含Nitro/JS性能、DNS预取/页面缓存、Reader、iCloud标签/Keychain、WebInspector、阅读与分享、音视频/字幕/轨道、WebAudio、CSS滤镜、ES5.1、表单/语义元素、地理位置/拖放/ruby、History/EventSource/WebSocket及扩展签名沙箱。
阅读模式和密码钥匙串属于用户功能;站点不能读取整个Keychain。扩展沙箱并非无风险证明;厂商速度百分比不等于本项目的可重现实验。
独立实例的实际范围
本例在本机浏览器真实创建受控iframe srcdoc、同源History状态和临时存储,观察back/forward事件后清理;只用本页自己的状态,不接触用户其它标签历史。
此例证明相关标准代码在当前测试环境的行为,不宣称已在Safari/WebKit、真实苹果设备、系统钥匙串、媒体或阅读模式运行。对应平台待测保留。
历史发行与技术条目(非当前支持承诺)
| 版本 | 日期/历史时期 | 保留的能力与用途 | 准确性、迁移及运行边界 |
|---|---|---|---|
| 7/6.1 | 2013历史 | Mavericks及Lion/MountainLion分支、JS/内存优化、TopSites/侧栏、iCloudKeychain、分享链接、闲置插件暂停 | 六月宣布与十月正式发布区分;密码/信用卡属于用户敏感资料,不由站点读取。 |
| 6 | 2012历史 | iCloud标签、WebAudio、CSS滤镜、媒体文本轨道/同步、ES5.1、权限、WebInspector、阅读体验 | 通过OS更新,Windows没有Safari6;平台支持不能直接套到今天。 |
| 5 | 2010历史 | Nitro、DNS预取/页面缓存、Reader、视频全屏/字幕、地理位置/语义元素/拖放/表单验证/ruby/History/EventSource/WebSocket、签名沙箱扩展、Bing搜索 | 速度百分比需明确负载;扩展沙箱不代表无风险,旧Windows分支早已不维护。 |
| 4 | 2009历史 | Mac/Windows历史分支 | 不是当前受支持下载。 |
| 3 | 2007历史 | Mac/Windows历史分支 | 不是现今系统要求。 |
| 2 | 2005历史 | Mac平台分支 | 历史默认浏览器变化不等于今天统计份额。 |
| 1 | 2003历史 | 首个正式产品阶段 | 2003年初宣布与六月正式版分开。 |
历史统计表 3b7d0473(原始异常保留,非本站/当前全球样本)
| 2014 | 总计 | 未记录(不等于0) | S 7 | S 6 | S 5 |
|---|---|---|---|---|---|
| 5 月 | 3.8 % | 未记录(不等于0) | 3.0 % | 0.7 % | 0.3 % |
| 4 月 | 4.0 % | 未记录(不等于0) | 2.8 % | 0.8 % | 0.4 % |
| 3 月 | 3.9 % | 未记录(不等于0) | 2.5 % | 0.9 % | 0.5 % |
| 2 月 | 4.0 % | 未记录(不等于0) | 2.5 % | 1.0 % | 0.5 % |
| 1 月 | 3.9 % | 未记录(不等于0) | 2.3 % | 1.1 % | 0.5 % |
| 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) |
| 2013 | 总计 | S 7 | S 6 | S 5 | S 4 |
| 12 月 | 3.8 % | 2.2 % | 1.1 % | 0.5 % | 0.0 % |
| 11 月 | 4.0 % | 2.0 % | 1.4 % | 0.6 % | 0.0 % |
| 10 月 | 3.8 % | 1.0 % | 2.1 % | 0.7 % | 0.0 % |
| 9 月 | 3.9 % | 未记录(不等于0) | 3.1 % | 0.8 % | 0.0 % |
| 8 月 | 3.9 % | 未记录(不等于0) | 3.0 % | 0.9 % | 0.0 % |
| 7 月 | 3.6 % | 未记录(不等于0) | 2.8 % | 0.8 % | 0.0 % |
| 6 月 | 3.9 % | 未记录(不等于0) | 3.0 % | 0.9 % | 0.0 % |
| 5 月 | 4.0 % | 未记录(不等于0) | 2.9 % | 1.0 % | 0.0 % |
| 4 月 | 4.0 % | 未记录(不等于0) | 2.8 % | 1.1 % | 0.0 % |
| 3 月 | 4.1 % | 未记录(不等于0) | 2.8 % | 1.2 % | 0.1 % |
| 2 月 | 4.1 % | 未记录(不等于0) | 2.7 % | 1.3 % | 0.1 % |
| 1 月 | 4.2 % | 未记录(不等于0) | 2.7 % | 1.4 % | 0.1 % |
| 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) |
| 2012 | 总计 | 未记录(不等于0) | S 6 | S 5 | S 4 |
| 12 月 | 4.2 % | 未记录(不等于0) | 2.6 % | 1.5 % | 0.1 % |
| 11 月 | 4.4 % | 未记录(不等于0) | 2.6 % | 1.7 % | 0.1 % |
| 10 月 | 4.3 % | 未记录(不等于0) | 2.3 % | 1.9 % | 0.1 % |
| 9 月 | 4.2 % | 未记录(不等于0) | 1.9 % | 2.2 % | 0.1 % |
| 8 月 | 4.0 % | 未记录(不等于0) | 1.4 % | 2.5 % | 0.1 % |
| 7 月 | 3.9 % | 未记录(不等于0) | 0.2 % | 3.6 % | 0.1 % |
| 6 月 | 4.1 % | 未记录(不等于0) | 未记录(不等于0) | 4.0 % | 0.1 % |
| 5 月 | 4.3 % | 未记录(不等于0) | 未记录(不等于0) | 4.2 % | 0.1 % |
| 4 月 | 4.5 % | 未记录(不等于0) | 未记录(不等于0) | 4.4 % | 0.1 % |
| 3 月 | 4.4 % | 未记录(不等于0) | 未记录(不等于0) | 4.3 % | 0.1 % |
| 2 月 | 4.5 % | 未记录(不等于0) | 未记录(不等于0) | 4.4 % | 0.1 % |
| 1 月 | 4.3 % | 未记录(不等于0) | 未记录(不等于0) | 4.2 % | 0.1 % |
| 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) |
| 2011 | 总计 | 未记录(不等于0) | S 5 | S 4 | S 3 |
| 12 月 | 4.2 % | 未记录(不等于0) | 4.1 % | 0.1 % | 0.0 % |
| 11 月 | 4.2 % | 未记录(不等于0) | 4.1 % | 0.1 % | 0.0 % |
| 10 月 | 4.2 % | 未记录(不等于0) | 4.0 % | 0.2 % | 0.0 % |
| 9 月 | 4.0 % | 未记录(不等于0) | 3.8 % | 0.2 % | 0.0 % |
| 8 月 | 3.8 % | 未记录(不等于0) | 3.6 % | 0.2 % | 0.0 % |
| 7 月 | 3.6 % | 未记录(不等于0) | 3.4 % | 0.2 % | 0.0 % |
| 6 月 | 3.7 % | 未记录(不等于0) | 3.5 % | 0.2 % | 0.0 % |
| 5 月 | 4.0 % | 未记录(不等于0) | 3.6 % | 0.3 % | 0.1 % |
| 4 月 | 4.1 % | 未记录(不等于0) | 3.7 % | 0.3 % | 0.1 % |
| 3 月 | 4.0 % | 未记录(不等于0) | 3.6 % | 0.3 % | 0.1 % |
| 2 月 | 4.1 % | 未记录(不等于0) | 3.6 % | 0.4 % | 0.1 % |
| 1 月 | 4.0 % | 未记录(不等于0) | 3.5 % | 0.4 % | 0.1 % |
| 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) |
| 2010 | 总计 | 未记录(不等于0) | S 5 | S 4 | S 3 |
| 12 月 | 3.8 % | 未记录(不等于0) | 3.2 % | 0.5 % | 0.1 % |
| 11 月 | 4.0 % | 未记录(不等于0) | 3.1 % | 0.7 % | 0.2 % |
| 10 月 | 3.9 % | 未记录(不等于0) | 3.1 % | 0.7 % | 0.1 % |
| 9 月 | 3.7 % | 未记录(不等于0) | 2.9 % | 0.7 % | 0.1 % |
| 8 月 | 3.5 % | 未记录(不等于0) | 2.6 % | 0.8 % | 0.1 % |
| 7 月 | 3.4 % | 未记录(不等于0) | 2.3 % | 1.0 % | 0.1 % |
| 6 月 | 3.6 % | 未记录(不等于0) | 1.4 % | 2.1 % | 0.1 % |
| 5 月 | 3.5 % | 未记录(不等于0) | 未记录(不等于0) | 3.3 % | 0.2 % |
| 4 月 | 3.7 % | 未记录(不等于0) | 未记录(不等于0) | 3.5 % | 0.2 % |
| 3 月 | 3.7 % | 未记录(不等于0) | 未记录(不等于0) | 3.5 % | 0.2 % |
| 2 月 | 3.8 % | 未记录(不等于0) | 未记录(不等于0) | 3.5 % | 0.3 % |
| 1 月 | 3.7 % | 未记录(不等于0) | 未记录(不等于0) | 3.4 % | 0.3 % |
| 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) |
| 2009 | 总计 | 未记录(不等于0) | 未记录(不等于0) | S 4 | S 3 |
| 12 月 | 3.6 % | 未记录(不等于0) | 未记录(不等于0) | 3.3 % | 0.3 % |
| 11 月 | 3.8 % | 未记录(不等于0) | 未记录(不等于0) | 3.4 % | 0.4 % |
| 10 月 | 3.8 % | 未记录(不等于0) | 未记录(不等于0) | 3.3 % | 0.5 % |
| 9 月 | 3.6 % | 未记录(不等于0) | 未记录(不等于0) | 3.0 % | 0.6 % |
| 8 月 | 3.3 % | 未记录(不等于0) | 未记录(不等于0) | 2.6 % | 0.7 % |
| 7 月 | 3.3 % | 未记录(不等于0) | 未记录(不等于0) | 2.4 % | 0.9 % |
| 6 月 | 3.1 % | 未记录(不等于0) | 未记录(不等于0) | 1.7 % | 1.4 % |
| 5 月 | 3.0 % | 未记录(不等于0) | 未记录(不等于0) | 0.9 % | 2.1 % |
| 4 月 | 3.0 % | 未记录(不等于0) | 未记录(不等于0) | 0.9 % | 2.1 % |
| 3 月 | 3.1 % | 未记录(不等于0) | 未记录(不等于0) | 1.0 % | 2.1 % |
| 2 月 | 3.0 % | 未记录(不等于0) | 未记录(不等于0) | 0.2 % | 2.8 % |
| 1 月 | 3.0 % | 未记录(不等于0) | 未记录(不等于0) | 0.1 % | 2.9 % |
| 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) |
| 2008 | 总计 | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | S 3 |
| 12 月 | 2.7 % | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 2.7 % |
| 11 月 | 2.7 % | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 2.7 % |
| 10 月 | 2.8 % | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 2.8 % |
| 9 月 | 2.7 % | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 2.7 % |
| 8 月 | 2.6 % | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 2.6 % |
| 7 月 | 2.5 % | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 2.5 % |
| 6 月 | 2.6 % | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 2.6 % |
| 5 月 | 2.4 % | 未记录(不等于0) | 未记录(不等于0) | 未记录(不等于0) | 2.4 % |
接口、输入与可观察结果
| 项目 | 输入/语法 | 输出/作用 | 有效条件/边界 |
|---|---|---|---|
| pushState | 自有对象、同源URL | 新增历史条目 | 不直接触发popstate |
| back/forward | 当前隔离文档自有条目 | 实际popstate | 不读取其它标签历史 |
| replaceState | 原自有状态/URL | 恢复当前条目 | 不清空用户全局历史 |
| srcdoc | 本站完整标准模式HTML | 独立frame文档 | 不拿来做怪异模式实验 |
| 临时存储 | UUID键 | 写入/读取/删除 | 不处理用户密码/Keychain |
本章独立核心源码与验证步骤
import {check,finish,historical,percent,shares,percentagePoints,relativeGrowth,uaClue} from './lab-data.js';
try{
await historical('browsers-safari');const original={state:history.state,url:location.href};history.replaceState({mbsky:'baseline'},'',location.pathname);history.pushState({mbsky:'step'},'',location.pathname+'#step');check(history.state.mbsky==='step','push own state');async function traverse(action){return await new Promise((resolve,reject)=>{const timer=setTimeout(()=>reject(Error('history popstate timeout')),3000);addEventListener('popstate',function onPop(event){clearTimeout(timer);resolve(event.state)},{once:true});action()})}const back=await traverse(()=>history.back());check(back.mbsky==='baseline'&&!location.hash,'actual back event');const forward=await traverse(()=>history.forward());check(forward.mbsky==='step'&&location.hash==='#step','actual forward event');await traverse(()=>history.back());history.replaceState(original.state,'',original.url);check(location.href===original.url,'own current state restored');const key='mbsky-safari-'+crypto.randomUUID();try{localStorage.setItem(key,'learning');check(localStorage.getItem(key)==='learning','storage roundtrip')}finally{localStorage.removeItem(key)}const frame=document.createElement('iframe');frame.srcdoc='<!doctype html><html lang="zh-CN"><body><p id="own">蓝色天空网的独立srcdoc</p></body></html>';document.querySelector('main').append(frame);await new Promise(resolve=>frame.onload=resolve);check(frame.contentDocument.compatMode==='CSS1Compat'&&frame.contentDocument.querySelector('#own').textContent.includes('独立srcdoc'),'actual srcdoc');const actual={back_state:back,forward_state:forward,own_current_state_restored:true,temporary_storage_cleaned:localStorage.getItem(key)===null,srcdoc_standard_mode:true,Safari_runtime_not_claimed:true};document.querySelector('#state').textContent=JSON.stringify(actual,null,2);finish(actual);
}catch(error){window.mbskyError=String(error);document.querySelector('#status').textContent='运行失败:'+String(error)}
所需环境:Windows / Edge156.0.4314.58 / 本包HTTP / DPR1及显示章DPR2
当前源码 SHA256:266f5289a8b67022d2c3ffd16eb7ce288c457638a9dd8d00d234a10a2abd6f11
- 本页自有push/back/forward状态及popstate确实变化,当前原URL恢复,临时存储清除,srcdoc标准模式。
常见错误与边界
- 把旧统计、旧版本功能或其它浏览器品牌的历史说明当成当前已实机验证。
- 把缺失当0、负比例当合理数据、异常格式静默修正,或混淆百分点与相对增长。
- 只看UA/支持接口存在就认为用户身份与实际行为都已验证。
练习与解答
只改变一个自有输入或视口条件,写明分母、环境和预期,再比较真实页面数值与像素/几何。
展开参考解答
按本章具体接口条件和断言核对,所有浏览器品牌与历史平台按真实运行环境分别验收。