GET 與 POST

拜斷纜所賜,國外一堆網站連不上,反而偷得半日閒,再更新一下這裡。

較早前讀到一篇《The Definitive Guide to GET vs POST》,簡釋了一下 GET 和 POST 的優缺。並總結了 4 條準則:

  • 用 GET 來處理比較安全的動作(例如 search、view 等),因為 GET 可以被 cache 及 share 的特性;
  • 用 GET 來發送 ajax request,因為 POST 要先 send header 再 send 內容,比較麻煩;
  • 用 POST 來處理長的字串,因為 GET 的上限為 2048 個字符;
  • 用 POST 來處理敏感資料;

該文附送一張 work flow chart 一張,亦是我會轉載至這裡的唯一原因:

--------

願死者安息,望生者堅強。

This entry was posted in Web Design. Bookmark the permalink.

5 Responses to GET 與 POST

  1. 未上市 says:

    提供未上市股票、興櫃、準上市、零股,來電詢問,即時回報。

  2. 提供即時資訊、買賣行情、興櫃股票及未上市公司基本資料、財務報表等。

  3. 提供超過3000支未上市興櫃股票全台即時報價系統,詳盡個股資料與每日新聞。

  4. 未上市 says:

    提供未上市公司資料、行情、股務、中籤書、股價報價等電子報服務及資訊。

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>