Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Checkup your web pages

Checkup your web pages

2013/7/24 @ HP50

參考資訊:

* MetaCharsetAttribute (http://code.google.com/p/doctype-mirror/wiki/MetaCharsetAttribute)
* 怪異模式
 (http://zh.wikipedia.org/wiki/Quirks_mode)
* Using Self-Hosted Objects (
https://developers.facebook.com/docs/opengraph/using-objects/)
* html viewport meta 說明及淺見
 (http://blog.caesarchi.com/2012/05/html-viewport-meta.html)
* 瀏覽器的渲染原理簡介 (
http://coolshell.cn/articles/9666.html)
* Unused CSS (
http://unused-css.com/)
* CSS selector's specificity (http://www.w3.org/TR/css3-selectors/#specificity)
* Specificity Calculator
 (http://specificity.keegan.st/)
* Firebug Inspector (http://getfirebug.com/wiki/index.php/Inspector)
* OOCSS——概念篇 (http://www.w3cplus.com/css/oocss-concept)
* Web-Based Tools for Optimizing, Formatting and Checking CSS (
http://sixrevisions.com/css/css_code_optimization_formatting_validation/)
* Minimizing browser reflow (
https://developers.google.com/speed/articles/reflow)
* Progressive enhancement is still important
 (http://jakearchibald.com/2013/progressive-enhancement-still-important/)
* CSS Guidelines (https://github.com/chadluo/CSS-Guidelines/blob/master/README.md)

大澤木小鐵

July 24, 2013
Tweet

More Decks by 大澤木小鐵

Other Decks in Technology

Transcript

  1. 幫你的網頁 民 國 102 年 7 月 23 日 值

    日 生 : 小 鐵 做體檢
  2. 一律使用 UTF-8 設定網頁伺服器的預設編碼 使用正確的檔案編碼 (多數編輯器皆可設定) meta charset 放在 title 之前

    (或任何會包含中文字的標籤) 預防措施 <meta charset="utf-8"> <title>中文字</title>
  3. <!doctype html> <html> <body> <table cellspacing="0"> <tr> <td> <img src="..."

    alt=""> </td> </tr> </table> </body> </html> <html> <body> <table cellspacing="0"> <tr> <td> <img src="..." alt=""> </td> </tr> </table> </body> </html>
  4. <!doctype html> <html> <body> <table cellspacing="0"> <tr> <td> <img src="..."

    alt=""> </td> </tr> </table> </body> </html> <html> <body> <table cellspacing="0"> <tr> <td> <img src="..." alt=""> </td> </tr> </table> </body> </html>
  5. Standards Mode <!doctype html> <html> <body> <table cellspacing="0"> <tr> <td>

    <img src="..." alt=""> </td> </tr> </table> </body> </html> <html> <body> <table cellspacing="0"> <tr> <td> <img src="..." alt=""> </td> </tr> </table> </body> </html>
  6. 怪異模式 http:/ /zh.wikipedia.org/wiki/Quirks_mode Quirks Mode Standards Mode <!doctype html> <html>

    <body> <table cellspacing="0"> <tr> <td> <img src="..." alt=""> </td> </tr> </table> </body> </html> <html> <body> <table cellspacing="0"> <tr> <td> <img src="..." alt=""> </td> </tr> </table> </body> </html>
  7. 一律用 HTML5 的 <!doctype html> (前面不要有任何字元) 在 img 樣式中加 display:

    block 幾乎對所有瀏覽器都能 開啟 Standard Mode 預防措施
  8. 加上這幾行就對了。 <meta property="og:title" content="<網頁標題>" /> <meta property="og:type" content="website" /> <meta

    property="og:description" content="<網頁描述>" /> <meta property="og:url" content="<網頁網址>" /> <meta property="og:image" content="<代表圖片>" /> <meta property="og:site_name" content="<網站名稱>" /> 預防措施
  9. CSS 檔案模組化 透過工具或 Framework 內建 功能將 CSS 合併及壓縮 Web-Based Tools

    for Optimizing, Formatting and Checking CSS http:/ /sixrevisions.com/css/css_code_optimization_formatting_validation/ 預防措施
  10. Progressive enhancement 功能易用性 >> 畫面完整性 預防措施 Progressive enhancement is still

    important http:/ /jakearchibald.com/2013/progressive-enhancement-still-important/