推一波《前端开发清单》收益大众

2018-05-31 15:41:56 +08:00
 Johnsen

前端开发清单

由于字数限制,部分内容未展示,请原文地址

前端开发清单是一份在站点 /HTML 页面发布到生产环境之前需要测试的所有元素的详尽列表。

![Front ‑ End_Checklist followed]( https://img.shields.io/badge/Front ‑ End_Checklist-followed-brightgreen.svg)

它基于前端开发人员多年的经验沉淀,以及其他优秀的开源清单。

目录

  1. Head
  2. HTML
  3. Webfonts
  4. CSS
  5. Images
  6. JavaScript
  7. Security
  8. Performance
  9. Accessibility
  10. SEO

How to use?

前端开发清单中的所列出的点是大部分前端项目所必需的关注的, 但某些元素可以省略或者并不是这么重要 (在管理 Web 应用程序的情况下,你可能并不需要 RSS 订阅源)。我们选择使用一下 3 级区分:

某些资源拥有特定的标识符,帮助你去理解清单上不同类型的内容或帮助。


Head

注意: 你能在HEAD 列表中找到 HTML 文档<head>标签内所有可配置的属性。

Meta 标签

<!-- Doctype HTML5 -->
<!doctype html>

接下来三个 meta 标签 (Charset, X-UA Compatible, Viewport) 需要首先在 head 中声明

<!-- 设置文档的字符编码 -->
<meta charset="utf-8">
<!-- 指示 Internet Explorer 使用其最新的渲染引擎 -->
<meta http-equiv="x-ua-compatible" content="ie=edge">

📖 指定旧文档模式(Internet Explorer)

<!-- 响应式网页设计 viewpoint 声明 -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 文档标题 -->
<title>网站标题不超过 55 个字符</title>
<!-- Meta Description -->
<meta name="description" content="Description of the page less than 150 characters">
<!-- 标准 favicon -->
<link rel="icon" type="image/x-icon" href="https://example.com/favicon.ico">
<!-- 推荐 favicon 格式 -->
<link rel="icon" type="image/png" href="https://example.com/favicon.png">
<!-- Apple Touch Icon -->
<link rel="apple-touch-icon" href="/custom-icon.png">

📖 配置 Web 应用程序

<!-- Microsoft Tiles -->
<meta name="msapplication-config" content="browserconfig.xml" />

browserconfig.xml 文件的最小所需 xml 标记如下所示:

<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
   <msapplication>
     <tile>
        <square70x70logo src="small.png"/>
        <square150x150logo src="medium.png"/>
        <wide310x150logo src="wide.png"/>
        <square310x310logo src="large.png"/>
     </tile>
   </msapplication>
</browserconfig>

📖 浏览器配置模式参考

<!-- 帮助防止重复内容出现 -->
<link rel="canonical" href="http://example.com/2017/09/a-new-article-to-red.html">

HTML 标签

<html lang="zh_cn">
<html dir="rtl">
<link rel="alternate" href="https://es.example.com/" hreflang="es">

📖 关于条件注释(Internet Explorer) - MSDN - Microsoft

Social meta

强烈推荐***Facebook OG*** and Twitter Cards。如果你针对某些特定的存在并希望确保显示,也可以考虑其他社交媒体的 meta。

注意: 使用 og:image:widthog:image:height 将会爬取制定尺寸的图像,以便图像能够快速呈现,无需进行异步下载和处理。

<meta property="og:type" content="website">
<meta property="og:url" content="https://example.com/page.html">
<meta property="og:title" content="Content Title">
<meta property="og:image" content="https://example.com/image.jpg">
<meta property="og:description" content="Description Here">
<meta property="og:site_name" content="Site Name">
<meta property="og:locale" content="en_US">
<!-- Next tags are optional but recommended -->
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@site_account">
<meta name="twitter:creator" content="@individual_account">
<meta name="twitter:url" content="https://example.com/page.html">
<meta name="twitter:title" content="Content Title">
<meta name="twitter:description" content="Content description less than 200 characters">
<meta name="twitter:image" content="https://example.com/image.jpg">

⬆ 返回顶部


1308 次点击
所在节点    程序员
2 条回复
darkjoker
2018-05-31 18:27:23 +08:00
不是专业前端但是要间中搞前端活的顶一波
nine99
2018-06-01 10:06:01 +08:00
支持

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/459270

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX