SlideShare a Scribd company logo
Web application Architecture and HTTP Protocol By: Mr. PHUPHA PUNYAPOTASAKUL ( ภูผา ปัญญาโพธาสกุล )
World Wide Web HTML HTTP TCP/IP Network Layer
HTTP Protocol Hypertext Transfer Protocol  ( HTTP ) is a  communications protocol  used to transfer or convey information on  intranets  and the  World Wide Web . Its original purpose was to provide a way to publish and retrieve  hypertext  pages. Development of HTTP was coordinated by the W3C ( World Wide Web Consortium ) and the IETF ( Internet Engineering Task Force ), culminating in the publication of a series of  RFCs , most notably  RFC 2616  ( June 1999 ), which defines HTTP/1.1, the version of HTTP in common use.
HTTP Specification HTTP 1.1 http://tools.ietf.org/html/rfc2616 HTTP 1.0 http://tools.ietf.org/html/rfc1945
HTTP Request/Response Server Browser HTTP Response HTTP Request
HTTP Request Methods HEAD Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. GET Requests a representation of the specified resource. By far the most common method used on the Web today. Should not be used for operations that cause side-effects (using it for actions in  web applications  is a common misuse). See 'safe methods' below. POST Submits data to be processed (e.g. from an  HTML form ) to the identified resource. The data is included in the body of the request. This may result in the creation of a new resource or the updates of existing resources or both.
HTTP Request Methods PUT Uploads a representation of the specified resource. DELETE Deletes the specified resource. TRACE Echoes back the received request, so that a client can see what intermediate servers are adding or changing in the request. OPTIONS Returns the HTTP methods that the server supports. This can be used to check the functionality of a web server. CONNECT Converts the request connection to a transparent  TCP / IP tunnel , usually to facilitate  SSL -encrypted communication (HTTPS) through an unencrypted HTTP  proxy . [ 1 ]
HTTP Example HTTP Request GET /index.html HTTP/1.1 Host:  www.example.com HTTP Response HTTP / 1.1   200 OK Date :  Mon, 23 May 2005   22:38:34 GMT Server :  Apache / 1.3.27  ( Unix )  ( Red - Hat / Linux ) Last - Modified :  Wed, 08 Jan 2003   23:11:55 GMT Accept - Ranges :  bytes Content - Length :  438 Connection :  close Content - Type :  text / html; charset = UTF-8 <HTML> <HEAD> <TITLE>Title</TITLE> … .
HTML
HTML Example <html> <head> <title>Title< / title> <meta http - equiv =&quot; Content - Type &quot;  content =&quot; text / html; charset = utf-8 &quot; > <link href =&quot;../ style / framework . css &quot;  rel =&quot; stylesheet &quot;  type =&quot; text / css &quot; > <script language =&quot; JavaScript &quot;  src =&quot;../ script / framework / config . js &quot; >< / script> < / head> <body leftmargin =&quot; 0 &quot;  topmargin =&quot; 0 &quot;  marginwidth =&quot; 0 &quot;  marginheight =&quot; 0 &quot; > … . … .. … . </body> </html>
HTML Specification Reference http :// www . w3 . org / TR / html4 / Maintain by Support History http:// www.eskimo.com/~bloo/indexdot/html/supportkey/a.htm
How does it work? Browser HTTP Request TCP/IP Packet Network
How does it work? Server HTTP Request TCP/IP Packet Network HTML Output HTTP Response TCP/IP Packet
How does it work? Browser Network HTML Output HTTP Response TCP/IP Packet
Question If HTTP message is larger than TCP/IP packet’s max length, what will happen? Is it possible to have more than one web site in the same server? How does it work? How can we know the server’s IP address
TCP/IP Each TCP/IP connection Source IP Source Port Destination IP Destination Port Reliable transmission Establish connection before transmit More overhead than UDP
Virtual Host Multi domain name in one server Each domain name have their own content, files, resource and etc. separately Domain name come from HTTP Request message Where IP come from?
HTTP  Persistent Connection Send multi HTTP Request in one connection Why? Reduce overhead Get response faster
HTTP Session State HTTP is a stateless protocol Web server implementation much easier and much more effective Dynamic content? Control session on application level
More detail about HTTP HTTP Header specification http :// en . wikipedia . org / wiki / List_of_HTTP_headers HTTP Status code http://en.wikipedia.org/wiki/List_of_HTTP_status_codes HTTP Compression Reduce bandwidth Use Content - Encoding
Server concept Application HTTP Request HTTP Response
Server concept Web Server HTTP Request Request parameter Server Page Server Page Server Page Server Page Use URI pattern to select which page to run.. HTML Output   +  Response parameter HTTP Response
E.g. JSP Web Server Server Page Request  Object Response Object
URL Uniform Resource Locators  ( URLs )  are strings that specify how to access network resources, such as HTML documents .  They are part of the more general class of Universal Resource Identifiers  ( URIs ).  The most important use of URLs is in HTML documents to identify the targets of hyperlinks .  When using a Web browser such as Netscape, every highlighted region has a URL associated with it, which is accessed when the link is activated by a mouse click .  Relative URLs  specify only a portion of the full URL  -  the missing information is inferred though the context of the source document .
Secure Socket Layer Secure Sockets Layer  ( SSL ), are  cryptographic protocols  that provide  secure  communications on the  Internet  for such things as  web browsing ,  e - mail ,  Internet faxing ,  instant messaging  and other data transfers.  URL pattern – https:// For HTTP, normally use port 443 More detail later
Web Cookie s HTTP cookies , sometimes known as  web cookies  or just  cookies , are parcels of text sent by a  server  to a  web   browser  and then sent back unchanged by the browser each time it accesses that server.  HTTP  cookies are used for  authenticating , tracking, and maintaining specific information about users, such as site preferences and the contents of their  electronic shopping carts . The term &quot;cookie&quot; is derived from &quot; magic cookie ,&quot; a well-known concept in  unix  computing which inspired both the idea and the name of HTTP cookies.
Web Cookies
Session Normally manage by web server Use cookie to help keeping session id or session identifier Session timeout, unused data will be cleared from memory
Session Browser Web Server Session  ID Cookie Session  Data Session  Data Session  Data Session  Data Browser Session  ID Cookie
Question If we close browser, will the cookie disappear ? Can we change value in cookie manually? How to open web site in a new session Open new browser window?
Ad

More Related Content

What's hot (20)

Http
HttpHttp
Http
NITT, KAMK
 
PHP Training: Module 1
PHP Training: Module 1PHP Training: Module 1
PHP Training: Module 1
hussulinux
 
Web (HTTP) request to response life cycle
Web (HTTP) request to response life cycleWeb (HTTP) request to response life cycle
Web (HTTP) request to response life cycle
Gopakumar Kunduveetil
 
Http - All you need to know
Http - All you need to knowHttp - All you need to know
Http - All you need to know
Gökhan Şengün
 
What's up with HTTP?
What's up with HTTP?What's up with HTTP?
What's up with HTTP?
Mark Nottingham
 
HTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesHTTP - The Protocol of Our Lives
HTTP - The Protocol of Our Lives
Brent Shaffer
 
Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)
maamir farooq
 
HTTP
HTTPHTTP
HTTP
altaykarakus
 
Http request&response by Vignesh 15 MAR 2014
Http request&response by Vignesh 15 MAR 2014Http request&response by Vignesh 15 MAR 2014
Http request&response by Vignesh 15 MAR 2014
Navaneethan Naveen
 
HTTP Protocol Basic
HTTP Protocol BasicHTTP Protocol Basic
HTTP Protocol Basic
Chuong Mai
 
Http protocol
Http protocolHttp protocol
Http protocol
Arpita Naik
 
21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards
Denis Ristic
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
Christopher Bartling
 
HTTP Definition and Basics.
HTTP Definition and Basics.HTTP Definition and Basics.
HTTP Definition and Basics.
Halah Salih
 
Http basics by-joshi_29_4_15-ppt
Http basics by-joshi_29_4_15-pptHttp basics by-joshi_29_4_15-ppt
Http basics by-joshi_29_4_15-ppt
Qwinix Technologies
 
01. http basics v27
01. http basics v2701. http basics v27
01. http basics v27
Eoin Keary
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
Rajan Pandey
 
Restful web services
Restful web servicesRestful web services
Restful web services
MD Sayem Ahmed
 
Http
HttpHttp
Http
Luavis Kang
 
Http-protocol
Http-protocolHttp-protocol
Http-protocol
Toushik Paul
 
PHP Training: Module 1
PHP Training: Module 1PHP Training: Module 1
PHP Training: Module 1
hussulinux
 
Web (HTTP) request to response life cycle
Web (HTTP) request to response life cycleWeb (HTTP) request to response life cycle
Web (HTTP) request to response life cycle
Gopakumar Kunduveetil
 
Http - All you need to know
Http - All you need to knowHttp - All you need to know
Http - All you need to know
Gökhan Şengün
 
HTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesHTTP - The Protocol of Our Lives
HTTP - The Protocol of Our Lives
Brent Shaffer
 
Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)
maamir farooq
 
Http request&response by Vignesh 15 MAR 2014
Http request&response by Vignesh 15 MAR 2014Http request&response by Vignesh 15 MAR 2014
Http request&response by Vignesh 15 MAR 2014
Navaneethan Naveen
 
HTTP Protocol Basic
HTTP Protocol BasicHTTP Protocol Basic
HTTP Protocol Basic
Chuong Mai
 
21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards
Denis Ristic
 
HTTP Definition and Basics.
HTTP Definition and Basics.HTTP Definition and Basics.
HTTP Definition and Basics.
Halah Salih
 
Http basics by-joshi_29_4_15-ppt
Http basics by-joshi_29_4_15-pptHttp basics by-joshi_29_4_15-ppt
Http basics by-joshi_29_4_15-ppt
Qwinix Technologies
 
01. http basics v27
01. http basics v2701. http basics v27
01. http basics v27
Eoin Keary
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
Rajan Pandey
 

Viewers also liked (20)

International Day in Oriveden Keskuskoulu 2011
International Day in Oriveden Keskuskoulu 2011International Day in Oriveden Keskuskoulu 2011
International Day in Oriveden Keskuskoulu 2011
Tiina Sarisalmi
 
Cineas Corso Taylor Made Per Zurich 27 Aprile 2010 Mattina
Cineas Corso Taylor Made Per Zurich 27 Aprile 2010 MattinaCineas Corso Taylor Made Per Zurich 27 Aprile 2010 Mattina
Cineas Corso Taylor Made Per Zurich 27 Aprile 2010 Mattina
Marco Contini
 
Askartelukerho kevät 2011
Askartelukerho kevät 2011Askartelukerho kevät 2011
Askartelukerho kevät 2011
Tiina Sarisalmi
 
Formative Capitalism
Formative CapitalismFormative Capitalism
Formative Capitalism
ANM Farukh
 
Economic Control or Reform or Structural Change : Occupy the 1?
Economic Control or Reform or Structural Change : Occupy the 1?Economic Control or Reform or Structural Change : Occupy the 1?
Economic Control or Reform or Structural Change : Occupy the 1?
ANM Farukh
 
Student Investment Fund
Student Investment FundStudent Investment Fund
Student Investment Fund
skyguy102
 
Denver Green Car Presentation
Denver Green Car PresentationDenver Green Car Presentation
Denver Green Car Presentation
banovsky
 
Can Taltavuit Ibiza. Magnificient Villa for Vacation Rentals in Ibiza
 Can Taltavuit Ibiza. Magnificient Villa for Vacation Rentals in Ibiza Can Taltavuit Ibiza. Magnificient Villa for Vacation Rentals in Ibiza
Can Taltavuit Ibiza. Magnificient Villa for Vacation Rentals in Ibiza
Javier Pérez Gallego ★★★★★ The DOER Ibiza
 
etwinning Learning Events - Pedagogical Objectives
etwinning Learning Events - Pedagogical Objectivesetwinning Learning Events - Pedagogical Objectives
etwinning Learning Events - Pedagogical Objectives
Tiina Sarisalmi
 
Eurooppalainen verkosto OPS:n resurssina – esimerkkinä eTwinning
Eurooppalainen verkosto OPS:n resurssina – esimerkkinä eTwinningEurooppalainen verkosto OPS:n resurssina – esimerkkinä eTwinning
Eurooppalainen verkosto OPS:n resurssina – esimerkkinä eTwinning
Tiina Sarisalmi
 
How to add a canvas to your image
How to add a canvas to your imageHow to add a canvas to your image
How to add a canvas to your image
Sirron Carrector
 
Tactiek verdedigen
Tactiek verdedigenTactiek verdedigen
Tactiek verdedigen
Johanda
 
Aubergine Parmigiana - Recipe
Aubergine Parmigiana - RecipeAubergine Parmigiana - Recipe
Aubergine Parmigiana - Recipe
Tiina Sarisalmi
 
MVT Asia Presentation
MVT Asia PresentationMVT Asia Presentation
MVT Asia Presentation
sijojoseph
 
Mentoriohjelma kansainvalisyyspaivat 2012
Mentoriohjelma kansainvalisyyspaivat 2012Mentoriohjelma kansainvalisyyspaivat 2012
Mentoriohjelma kansainvalisyyspaivat 2012
Tiina Sarisalmi
 
SRI Brochure -- Boardwalk Capital
SRI Brochure -- Boardwalk CapitalSRI Brochure -- Boardwalk Capital
SRI Brochure -- Boardwalk Capital
Scott Sadler
 
Springtime in Orivesi
Springtime in OrivesiSpringtime in Orivesi
Springtime in Orivesi
Tiina Sarisalmi
 
Orivesi - Down the Mainstreet
Orivesi - Down the MainstreetOrivesi - Down the Mainstreet
Orivesi - Down the Mainstreet
Tiina Sarisalmi
 
Unleash the 95%
Unleash the 95%Unleash the 95%
Unleash the 95%
Scott Sadler
 
International Day in Oriveden Keskuskoulu 2011
International Day in Oriveden Keskuskoulu 2011International Day in Oriveden Keskuskoulu 2011
International Day in Oriveden Keskuskoulu 2011
Tiina Sarisalmi
 
Cineas Corso Taylor Made Per Zurich 27 Aprile 2010 Mattina
Cineas Corso Taylor Made Per Zurich 27 Aprile 2010 MattinaCineas Corso Taylor Made Per Zurich 27 Aprile 2010 Mattina
Cineas Corso Taylor Made Per Zurich 27 Aprile 2010 Mattina
Marco Contini
 
Askartelukerho kevät 2011
Askartelukerho kevät 2011Askartelukerho kevät 2011
Askartelukerho kevät 2011
Tiina Sarisalmi
 
Formative Capitalism
Formative CapitalismFormative Capitalism
Formative Capitalism
ANM Farukh
 
Economic Control or Reform or Structural Change : Occupy the 1?
Economic Control or Reform or Structural Change : Occupy the 1?Economic Control or Reform or Structural Change : Occupy the 1?
Economic Control or Reform or Structural Change : Occupy the 1?
ANM Farukh
 
Student Investment Fund
Student Investment FundStudent Investment Fund
Student Investment Fund
skyguy102
 
Denver Green Car Presentation
Denver Green Car PresentationDenver Green Car Presentation
Denver Green Car Presentation
banovsky
 
etwinning Learning Events - Pedagogical Objectives
etwinning Learning Events - Pedagogical Objectivesetwinning Learning Events - Pedagogical Objectives
etwinning Learning Events - Pedagogical Objectives
Tiina Sarisalmi
 
Eurooppalainen verkosto OPS:n resurssina – esimerkkinä eTwinning
Eurooppalainen verkosto OPS:n resurssina – esimerkkinä eTwinningEurooppalainen verkosto OPS:n resurssina – esimerkkinä eTwinning
Eurooppalainen verkosto OPS:n resurssina – esimerkkinä eTwinning
Tiina Sarisalmi
 
How to add a canvas to your image
How to add a canvas to your imageHow to add a canvas to your image
How to add a canvas to your image
Sirron Carrector
 
Tactiek verdedigen
Tactiek verdedigenTactiek verdedigen
Tactiek verdedigen
Johanda
 
Aubergine Parmigiana - Recipe
Aubergine Parmigiana - RecipeAubergine Parmigiana - Recipe
Aubergine Parmigiana - Recipe
Tiina Sarisalmi
 
MVT Asia Presentation
MVT Asia PresentationMVT Asia Presentation
MVT Asia Presentation
sijojoseph
 
Mentoriohjelma kansainvalisyyspaivat 2012
Mentoriohjelma kansainvalisyyspaivat 2012Mentoriohjelma kansainvalisyyspaivat 2012
Mentoriohjelma kansainvalisyyspaivat 2012
Tiina Sarisalmi
 
SRI Brochure -- Boardwalk Capital
SRI Brochure -- Boardwalk CapitalSRI Brochure -- Boardwalk Capital
SRI Brochure -- Boardwalk Capital
Scott Sadler
 
Orivesi - Down the Mainstreet
Orivesi - Down the MainstreetOrivesi - Down the Mainstreet
Orivesi - Down the Mainstreet
Tiina Sarisalmi
 
Ad

Similar to KMUTNB - Internet Programming 2/7 (20)

WWW and HTTP
WWW and HTTPWWW and HTTP
WWW and HTTP
BG Java EE Course
 
Introduction to the World Wide Web
Introduction to the World Wide WebIntroduction to the World Wide Web
Introduction to the World Wide Web
Abdalla Mahmoud
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
Li Yi
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 
Web-01-HTTP.pptx
Web-01-HTTP.pptxWeb-01-HTTP.pptx
Web-01-HTTP.pptx
AliZaib71
 
Spider Course Day 1
Spider Course Day 1Spider Course Day 1
Spider Course Day 1
Harishankaran K
 
Starting With Php
Starting With PhpStarting With Php
Starting With Php
Harit Kothari
 
Webbasics
WebbasicsWebbasics
Webbasics
patinijava
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guide
Srihari
 
Http_Protocol.pptx
Http_Protocol.pptxHttp_Protocol.pptx
Http_Protocol.pptx
Abshar Fatima
 
ASP.NET WEB API Training
ASP.NET WEB API TrainingASP.NET WEB API Training
ASP.NET WEB API Training
Chalermpon Areepong
 
HTTP Basics Demo
HTTP Basics DemoHTTP Basics Demo
HTTP Basics Demo
InMobi Technology
 
WebApp #3 : API
WebApp #3 : APIWebApp #3 : API
WebApp #3 : API
Jean Michel
 
WWW & HTTP
WWW & HTTPWWW & HTTP
WWW & HTTP
subbarayudu chakali
 
Under the Covers with the Web
Under the Covers with the WebUnder the Covers with the Web
Under the Covers with the Web
Trevor Lohrbeer
 
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
ruyalarcon
 
www and http services
www and http serviceswww and http services
www and http services
Jenica Salmorin
 
Web Scraping with PHP
Web Scraping with PHPWeb Scraping with PHP
Web Scraping with PHP
Matthew Turland
 
Web engineering
Web engineeringWeb engineering
Web engineering
Mushtaq Ahmad Jan
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
Cathie101
 
Introduction to the World Wide Web
Introduction to the World Wide WebIntroduction to the World Wide Web
Introduction to the World Wide Web
Abdalla Mahmoud
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
Li Yi
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 
Web-01-HTTP.pptx
Web-01-HTTP.pptxWeb-01-HTTP.pptx
Web-01-HTTP.pptx
AliZaib71
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guide
Srihari
 
Under the Covers with the Web
Under the Covers with the WebUnder the Covers with the Web
Under the Covers with the Web
Trevor Lohrbeer
 
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
ruyalarcon
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
Cathie101
 
Ad

More from phuphax (9)

GPS Tracking by Tracking.in.th
GPS Tracking by Tracking.in.thGPS Tracking by Tracking.in.th
GPS Tracking by Tracking.in.th
phuphax
 
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7
phuphax
 
KMUTNB - Internet Programming 7/7
KMUTNB - Internet Programming 7/7KMUTNB - Internet Programming 7/7
KMUTNB - Internet Programming 7/7
phuphax
 
KMUTNB - Internet Programming 6/7
KMUTNB - Internet Programming 6/7KMUTNB - Internet Programming 6/7
KMUTNB - Internet Programming 6/7
phuphax
 
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7
phuphax
 
KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7
phuphax
 
KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7
phuphax
 
KMUTNB - Internet Programming 1/7
KMUTNB - Internet Programming 1/7KMUTNB - Internet Programming 1/7
KMUTNB - Internet Programming 1/7
phuphax
 
Abzolute Logistic Solution
Abzolute Logistic SolutionAbzolute Logistic Solution
Abzolute Logistic Solution
phuphax
 
GPS Tracking by Tracking.in.th
GPS Tracking by Tracking.in.thGPS Tracking by Tracking.in.th
GPS Tracking by Tracking.in.th
phuphax
 
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7
phuphax
 
KMUTNB - Internet Programming 7/7
KMUTNB - Internet Programming 7/7KMUTNB - Internet Programming 7/7
KMUTNB - Internet Programming 7/7
phuphax
 
KMUTNB - Internet Programming 6/7
KMUTNB - Internet Programming 6/7KMUTNB - Internet Programming 6/7
KMUTNB - Internet Programming 6/7
phuphax
 
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 5/7
phuphax
 
KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 4/7
phuphax
 
KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7KMUTNB - Internet Programming 3/7
KMUTNB - Internet Programming 3/7
phuphax
 
KMUTNB - Internet Programming 1/7
KMUTNB - Internet Programming 1/7KMUTNB - Internet Programming 1/7
KMUTNB - Internet Programming 1/7
phuphax
 
Abzolute Logistic Solution
Abzolute Logistic SolutionAbzolute Logistic Solution
Abzolute Logistic Solution
phuphax
 

Recently uploaded (20)

2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
How to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 SalesHow to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 Sales
Celine George
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
Chemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptxChemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptx
Mayuri Chavan
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
Lecture 1 Introduction history and institutes of entomology_1.pptx
Lecture 1 Introduction history and institutes of entomology_1.pptxLecture 1 Introduction history and institutes of entomology_1.pptx
Lecture 1 Introduction history and institutes of entomology_1.pptx
Arshad Shaikh
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
How to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo SlidesHow to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo Slides
Celine George
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Bridging the Transit Gap: Equity Drive Feeder Bus Design for Southeast Brooklyn
Bridging the Transit Gap: Equity Drive Feeder Bus Design for Southeast BrooklynBridging the Transit Gap: Equity Drive Feeder Bus Design for Southeast Brooklyn
Bridging the Transit Gap: Equity Drive Feeder Bus Design for Southeast Brooklyn
i4jd41bk
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
How to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 SalesHow to Manage Upselling in Odoo 18 Sales
How to Manage Upselling in Odoo 18 Sales
Celine George
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
Chemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptxChemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptx
Mayuri Chavan
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
Lecture 1 Introduction history and institutes of entomology_1.pptx
Lecture 1 Introduction history and institutes of entomology_1.pptxLecture 1 Introduction history and institutes of entomology_1.pptx
Lecture 1 Introduction history and institutes of entomology_1.pptx
Arshad Shaikh
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
How to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo SlidesHow to Add Customer Note in Odoo 18 POS - Odoo Slides
How to Add Customer Note in Odoo 18 POS - Odoo Slides
Celine George
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Bridging the Transit Gap: Equity Drive Feeder Bus Design for Southeast Brooklyn
Bridging the Transit Gap: Equity Drive Feeder Bus Design for Southeast BrooklynBridging the Transit Gap: Equity Drive Feeder Bus Design for Southeast Brooklyn
Bridging the Transit Gap: Equity Drive Feeder Bus Design for Southeast Brooklyn
i4jd41bk
 

KMUTNB - Internet Programming 2/7

  • 1. Web application Architecture and HTTP Protocol By: Mr. PHUPHA PUNYAPOTASAKUL ( ภูผา ปัญญาโพธาสกุล )
  • 2. World Wide Web HTML HTTP TCP/IP Network Layer
  • 3. HTTP Protocol Hypertext Transfer Protocol ( HTTP ) is a communications protocol used to transfer or convey information on intranets and the World Wide Web . Its original purpose was to provide a way to publish and retrieve hypertext pages. Development of HTTP was coordinated by the W3C ( World Wide Web Consortium ) and the IETF ( Internet Engineering Task Force ), culminating in the publication of a series of RFCs , most notably RFC 2616 ( June 1999 ), which defines HTTP/1.1, the version of HTTP in common use.
  • 4. HTTP Specification HTTP 1.1 http://tools.ietf.org/html/rfc2616 HTTP 1.0 http://tools.ietf.org/html/rfc1945
  • 5. HTTP Request/Response Server Browser HTTP Response HTTP Request
  • 6. HTTP Request Methods HEAD Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. GET Requests a representation of the specified resource. By far the most common method used on the Web today. Should not be used for operations that cause side-effects (using it for actions in web applications is a common misuse). See 'safe methods' below. POST Submits data to be processed (e.g. from an HTML form ) to the identified resource. The data is included in the body of the request. This may result in the creation of a new resource or the updates of existing resources or both.
  • 7. HTTP Request Methods PUT Uploads a representation of the specified resource. DELETE Deletes the specified resource. TRACE Echoes back the received request, so that a client can see what intermediate servers are adding or changing in the request. OPTIONS Returns the HTTP methods that the server supports. This can be used to check the functionality of a web server. CONNECT Converts the request connection to a transparent TCP / IP tunnel , usually to facilitate SSL -encrypted communication (HTTPS) through an unencrypted HTTP proxy . [ 1 ]
  • 8. HTTP Example HTTP Request GET /index.html HTTP/1.1 Host: www.example.com HTTP Response HTTP / 1.1 200 OK Date : Mon, 23 May 2005 22:38:34 GMT Server : Apache / 1.3.27 ( Unix ) ( Red - Hat / Linux ) Last - Modified : Wed, 08 Jan 2003 23:11:55 GMT Accept - Ranges : bytes Content - Length : 438 Connection : close Content - Type : text / html; charset = UTF-8 <HTML> <HEAD> <TITLE>Title</TITLE> … .
  • 10. HTML Example <html> <head> <title>Title< / title> <meta http - equiv =&quot; Content - Type &quot; content =&quot; text / html; charset = utf-8 &quot; > <link href =&quot;../ style / framework . css &quot; rel =&quot; stylesheet &quot; type =&quot; text / css &quot; > <script language =&quot; JavaScript &quot; src =&quot;../ script / framework / config . js &quot; >< / script> < / head> <body leftmargin =&quot; 0 &quot; topmargin =&quot; 0 &quot; marginwidth =&quot; 0 &quot; marginheight =&quot; 0 &quot; > … . … .. … . </body> </html>
  • 11. HTML Specification Reference http :// www . w3 . org / TR / html4 / Maintain by Support History http:// www.eskimo.com/~bloo/indexdot/html/supportkey/a.htm
  • 12. How does it work? Browser HTTP Request TCP/IP Packet Network
  • 13. How does it work? Server HTTP Request TCP/IP Packet Network HTML Output HTTP Response TCP/IP Packet
  • 14. How does it work? Browser Network HTML Output HTTP Response TCP/IP Packet
  • 15. Question If HTTP message is larger than TCP/IP packet’s max length, what will happen? Is it possible to have more than one web site in the same server? How does it work? How can we know the server’s IP address
  • 16. TCP/IP Each TCP/IP connection Source IP Source Port Destination IP Destination Port Reliable transmission Establish connection before transmit More overhead than UDP
  • 17. Virtual Host Multi domain name in one server Each domain name have their own content, files, resource and etc. separately Domain name come from HTTP Request message Where IP come from?
  • 18. HTTP Persistent Connection Send multi HTTP Request in one connection Why? Reduce overhead Get response faster
  • 19. HTTP Session State HTTP is a stateless protocol Web server implementation much easier and much more effective Dynamic content? Control session on application level
  • 20. More detail about HTTP HTTP Header specification http :// en . wikipedia . org / wiki / List_of_HTTP_headers HTTP Status code http://en.wikipedia.org/wiki/List_of_HTTP_status_codes HTTP Compression Reduce bandwidth Use Content - Encoding
  • 21. Server concept Application HTTP Request HTTP Response
  • 22. Server concept Web Server HTTP Request Request parameter Server Page Server Page Server Page Server Page Use URI pattern to select which page to run.. HTML Output + Response parameter HTTP Response
  • 23. E.g. JSP Web Server Server Page Request Object Response Object
  • 24. URL Uniform Resource Locators ( URLs ) are strings that specify how to access network resources, such as HTML documents . They are part of the more general class of Universal Resource Identifiers ( URIs ). The most important use of URLs is in HTML documents to identify the targets of hyperlinks . When using a Web browser such as Netscape, every highlighted region has a URL associated with it, which is accessed when the link is activated by a mouse click . Relative URLs specify only a portion of the full URL - the missing information is inferred though the context of the source document .
  • 25. Secure Socket Layer Secure Sockets Layer ( SSL ), are cryptographic protocols that provide secure communications on the Internet for such things as web browsing , e - mail , Internet faxing , instant messaging and other data transfers. URL pattern – https:// For HTTP, normally use port 443 More detail later
  • 26. Web Cookie s HTTP cookies , sometimes known as web cookies or just cookies , are parcels of text sent by a server to a web browser and then sent back unchanged by the browser each time it accesses that server. HTTP cookies are used for authenticating , tracking, and maintaining specific information about users, such as site preferences and the contents of their electronic shopping carts . The term &quot;cookie&quot; is derived from &quot; magic cookie ,&quot; a well-known concept in unix computing which inspired both the idea and the name of HTTP cookies.
  • 28. Session Normally manage by web server Use cookie to help keeping session id or session identifier Session timeout, unused data will be cleared from memory
  • 29. Session Browser Web Server Session ID Cookie Session Data Session Data Session Data Session Data Browser Session ID Cookie
  • 30. Question If we close browser, will the cookie disappear ? Can we change value in cookie manually? How to open web site in a new session Open new browser window?