or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
你的 JS 該減肥了!5個提升網頁載入速度的技巧 / Shubo(趙勗博)
歡迎來到 Modern Web 2020 共筆
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →共筆入口:https://hackmd.io/@ModernWeb/2020
手機版請點選上方 按鈕展開議程列表。
簡報下載
1. 優化網頁載入速度
為什麼要加快載入速度
第一步:善用測速工具
如何決定優化的優先順序
2. 我的JS很肥會怎樣嗎?
瀏覽器運作原理
Code Splitting
3. 拆分出Vendor Bundle
Why Vendor Bundle?
未優化Bundle的規劃
運用工具分析配置是否合理
取出 Vendor bundle
585KB310KB426KB218KB366KB632KB366KB632KB997KB1055KB*4. Dynamic Loading
ESM import()
根據路徑做 Dynamic Import
310KB235KB218KB189KB1156KB1072KB*1055KB1026KB*對肥大套件做 Dynamic import
632KB267KB632KB267KB1072KB784KB*1026KB707KB*5. Tree-Shaking
如何設定 Tree-shaking
205KB87KB205KB87KB784KB666KB*707KB589KB*6. 其他小技巧
第三方套件使用 CDN 版本
使用 preset-env 減少 Polyfill 體積
31KB18KB585KB235KB426KB189KB205KB87KB205KB87KB366KB267KB366KB267KB1156KB666KB(-43%)997KB589KB* (-41%)結論
tags:
MW20
維運與測試
負載平衡