Try   HackMD

HTTPS 與 HTTP 的差異

Image Not Showing Possible Reasons
  • 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

(全稱:Hyper Text Transfer Protocol over Secure Socket Layer超級文字傳輸安全協定)

➤ Client & Server

一般來說傳輸資料的兩端會分為 客戶端 ( Client ) 跟 伺服器端 ( Server )

  • Client: 以網頁來說就是你的瀏覽器、電腦,主要會發送 「 請求 request 」到 Server 端
    • request 請求:html、css、js越多request 越多 thread 執行緒 ,依序傳到 CPU。所以盡量合併CSS,JS)
  • Server: 收到 request 開始處理資料,完成後會回傳 「回應 response 」到 Client 端

➤ request & response

網頁的畫面,由一堆 request跟response組合起來

  1. 瀏覽器發送 HTTP request 到 Server
    • request 包含 head 跟 body
  2. Server 回傳 response 到瀏覽器
    • response 包含 head 跟 body
  3. 瀏覽器進行解析 html、css、js、圖片檔案…等等,渲染成可讀性高的網頁內容

想要看到網頁上進行了哪些 request,可以打開瀏覽器的開發人員工具,切到 Network 標籤底下,再重新整理網頁,就可以看到 resquest 跟回傳的 response 詳細資訊。

執行過程

➷ SSL 加密

(在 應用層 跟 TCP 中間有一道加密的機制)無法觀看傳送封包的內容

Image Not Showing Possible Reasons
  • 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 →

TLS 1.2(SSL 3.3)

✐ HTTP v.s. HTTPS

HTTP 是 80 port、HTTPS 是 443 port

HTTP 是 應用層、HTTPS 是傳輸層

✐ 發送 HTTP 網路請求管道 (TCP/IP 封包傳送)

  • JS AJAX
  • POSTMAN
  • cURL 終端機
  • 各種後端語言
  • IOS/Android
  • Desktop App

撈 API 資料不是只能寫 JavaScript AJAX 發送 HTTP request 網路請求,也可以透過 POSTMAN、終端機等不同方式請求

tags:前端筆記

最後,親愛的大家!我需要你的大聲鼓勵 ٩(⚙ᴗ⚙)۶

如果覺得這篇文章對你有幫助,請給我個一個小小的鼓勵 ❤ 讓我知道,這會成為我寫下去很大的動力。
對了,我還有其他文章,如果有興趣也來逛逛吧!
(文章中如有覺得不妥之處、錯誤內容,也可以透過聯絡我,我會儘速改善,感謝!)

☞ YoJanni 珍妮 2021 正在設計轉職前端的路上,希望大家在學習的路上能夠一起成長
☞ 聯絡我