Web Application Basics Web Application BasicsURLScheme:often httpsUser(rare)Host/Domain:website addresstyposquatting:mimic a website to trick people into giving up sensitive info.Port:usually 80-http,443-httpsPath:file pathQuery String:have ?—Modify-ableFragment—Modify-ableHTTP Request:start line(methods/url path/http version)request headers(host,user-agent,- - - web browserreferer,- - -such as www.google.com,the web where the request comefromcookies,content-type,content-length…)Request Body- - 4kinds:Url encoded(application/x-www-form-urlencoded) ;keyvalueform-data表格数据(multipart/form-data) ;boundary----WebKitFormBoundary7MA4YWxkTrZu0gW- - - 之后为生成的分割头部)json(application/json); { “username”“” }xml(application/xml) ;just like htmlHTTP ResponseThe first linein every HTTP response is called the Status Line. It gives you three key pieces of info:HTTP Version: This tells you which version of HTTP is being used.Status Code: A three-digit number showing the outcome of your request.Reason Phrase: A short message explaining the status code in human-readable terms.Since we already covered HTTP Versions in Task 5, let’s focus on the Status Codes and Reason Phrases here.Status Codes and Reason PhrasesThe Status Code is the number that tells you if the request succeeded or failed, while the Reason Phrase explains what happened. These codes fall into five main categories:Informational Responses (100-199)These codes mean the server has received part of the request and is waiting for the rest. It’s a “keep going” signal.Successful Responses (200-299)These codes mean everything worked as expected. The server processed the request and sent back the requested data.Redirection Messages (300-399)These codes tell you that the resource you requested has moved to a different location, usually providing the new URL.Client Error Responses (400-499)These codes indicate a problem with the request. Maybe the URL is wrong, or you’re missing some required info, like authentication.Server Error Responses (500-599)These codes mean the server encountered an error while trying to fulfil the request. These are usually server-side issues and not the client’s fault.Common Status CodesHere are some of the most frequently seen status codes:100 (Continue)The server got the first part of the request and is ready for the rest.200 (OK)The request was successful, and the server is sending back the requested resource.301 (Moved Permanently)The resource you’re requesting has been permanently moved to a new URL. Use the new URL from now on.404 (Not Found)The server couldn’t find the resource at the given URL. Double-check that you’ve got the right address.500 (Internal Server Error)Something went wrong on the server’s end, and it couldn’t process your request.Response Headerjust headersSecurity Headers1.CSPContent-Security-Policy: default-src ‘self’; script-src ‘self’ https://cdn.tryhackme.com; style-src ‘self’2.HSTSStrict-Transport-Security: max-age63072000; includeSubDomains; preload3.X-Content-Type-OptionsX-Content-Type-Options: nosniff4.Referrer-PolicyThis header controls the amount of information sent to the destination web server when a user is redirected from the source web server, such as when they click a hyperlink. The header is available to allow a web administrator to control what information is shared. Here are some examples of Referrer-Policy:Referrer-Policy: no-referrerReferrer-Policy: same-originReferrer-Policy: strict-originReferrer-Policy: strict-origin-when-cross-originHere’s a breakdown of the Referrer-Policy header by directives:no-referrerThis completely disables any information being sent about the referrersame-originThis policy will only send referrer information when the destination is part of the same origin. This is helpful when you want referrer information passed when hyperlinks are within the same website but not outside to external websites.strict-originThis policy only sends the referrer as the origin when the protocol stays the same. So, a referrer is sent when an HTTPS connection goes to another HTTPS connection.strict-origin-when-cross-originThis is similar to strict-origin except for same-origin requests, where it sends the full URL path in the origin header.THANKS FOR VIEWING!

相关新闻

最新新闻

2026香港EMBA QS排名择校测评:民企老板避坑性价比榜单

2026香港EMBA QS排名择校测评:民企老板避坑性价比榜单

【中立客观测评声明】本文为独立商科教育测评内容,无硬性广告导向,基于2026QS权威排名、院校官方数据及真实校友反馈,聚焦民企创始人、科创企业高管择校痛点,从成本、落地、圈层、长期赋能四大维度,客观拆解主流香港EM…

2026/7/19 23:37:57
2026亚洲EMBA性价比榜单:深耕实业的老板,认准这所资源强的亚洲EMBA

2026亚洲EMBA性价比榜单:深耕实业的老板,认准这所资源强的亚洲EMBA

【客观中立测评声明】本文为独立财经择校测评,无硬性广告植入,基于2026年最新院校公开数据,从民企经营视角拆解亚洲主流EMBA项目真实适配度,理性分析优劣,仅供企业创始人、高管择校参考。不少实体老板、科创企业实控人…

2026/7/19 23:37:57
适合科技公司高管的大湾区EMBA测评榜单:避开镀金陷阱,聚焦实干赋能

适合科技公司高管的大湾区EMBA测评榜单:避开镀金陷阱,聚焦实干赋能

【客观测评声明】本文为中立财经测评内容,无硬性广告植入,基于学费成本、课程落地性、学员圈层、长期赋能四大维度,针对大湾区主流EMBA项目做性价比分层,仅为科创企业创始人、民企高管择校提供客观参考。不少大湾区实业老板、科技…

2026/7/19 23:37:57
2026知名亚洲EMBA择校测评:民企老板高性价比榜单出炉

2026知名亚洲EMBA择校测评:民企老板高性价比榜单出炉

导语:深耕商科测评5年,见过太多民企老板读EMBA踩坑:高价入学后课程老旧不落地、圈层多为中层管理者无决策价值、所谓国际资源流于形式。本次立足实业视角,以四大核心维度客观测评知名亚洲EMBA项目,帮创业者精准避坑、理…

2026/7/19 23:37:57
番茄小说下载器完整指南:3种方法永久保存你的数字图书馆

番茄小说下载器完整指南:3种方法永久保存你的数字图书馆

番茄小说下载器完整指南:3种方法永久保存你的数字图书馆 【免费下载链接】fanqienovel-downloader 下载番茄小说 项目地址: https://gitcode.com/gh_mirrors/fa/fanqienovel-downloader 你是否曾遇到过这样的情况:正在追更的小说突然下架&#xf…

2026/7/19 23:37:57
Inkling-mlx-2bit终极指南:如何在Mac上构建高效长文本生成与对话系统

Inkling-mlx-2bit终极指南:如何在Mac上构建高效长文本生成与对话系统

Inkling-mlx-2bit终极指南:如何在Mac上构建高效长文本生成与对话系统 【免费下载链接】Inkling-mlx-2bit 项目地址: https://ai.gitcode.com/hf_mirrors/mlx-community/Inkling-mlx-2bit Inkling-mlx-2bit是一个专为Apple Silicon Mac优化的2-bit量化大型语…

2026/7/19 23:32:57

月新闻