SlideShare a Scribd company logo
Dr . Majzoob Kamal Eldein Omer
 Provide finer cache control to both sender and recipient
 A new general Cache-Control directive that must be
obeyed!
 Cache Proxy, Client browser and server are obligated to
obey
Some of the directives in requests:
 Cache-control: no-cache Client forces up-to-date
check with origin server.
 Cache-control: max-age=1000 Client (user
or intermediate cache) is prepared to accept
object without up-to-date check if age is < 1000
seconds.
 Overrides expires: If document has not expired but
document age is > max-age, then cache performs an up-
to-date check.
 Cache-control : public The object is
cacheable by client and network
caches…basically anywhere!
 Cache-control: private The object can be
cached only by the client.
 Cache-control: max-age =1000 Server
imposes up-to-date check after 1000 seconds.
Similar to Expires header.
Server control:
 If origin server doesn’t want the object cached, it can
put in response cache-control:private .
 If origin server wants an up-to-date check for each
request, it can put in response cache-control: proxy-
revalidate .
 If origin server wants up-to-date check once the object
age > 1000, it can put in response: cache-control: max-
age=1000
Browser control:
 If client wants an up-to-date check even if the object
has not expired, it puts in request: Cache-control: no-
cache .
 In client is willing to accept the object that is less than
1000 seconds old without an up-to-date check, it can put
in request: Cache-control: max-age=1000 .
 CGI stands for Common Gateway Interface.
 CGI is a standard programming interface to Web
servers that gives us a way to make our sites
dynamic and interactive.
 CGI is not a programming language. It is just a
set of standards (protocols.)
 CGI can be implemented in an interpreted
language such as PERL or in a compiled language
such as C.
 CGI programs work as follows:
 STEP 1 (On the client side): Get Information from
the user (using HTML forms, SSI, Java Applet,
…,etc).
 STEP 2 (On the server side): Process the data,
connect to DATABASE, search for PATTERNS,
…,etc.
 STEP 3 (On the server side): Send the result of
computation back to the client.
 The steps involved in preparing a CGI
program for work.
1. Contact your Web host to find out where
you should put your CGI programs on the
server. Usually it will be a directory on
the server named “cgi-bin”.
2. Set up the access permission of directory
“cgi-bin”
3- Set up the access permission of the CGI
program
4- Test your CGI program from the server
command line to make sure it works
perfectly before publishing it.
 <form action=“cgi-prog.cgi”
method=“POST”>
. . .
</form>
 Two HTTP methods are available:
 GET
 POST
 The CGI program will be invoked every
time you the button SUBMIT is clicked.
 GET Method the data passed within the
query string of URL : for example:
http://std.edu/info/program?querystring
the data sent after the “?”
POST Method :
The data sent via entity body
 CGI Script Output Format :
 In whatever language a CGI script is
programmed it MUST send information back
in the following format:
 The Output Header
 A Blank Line
 The Output Data
 Content-Types
 The following are common formats/content-
types :
Format Content-Type
 HTML text/html
 Gif image/gif
 JPEG image/jpeg
 Depending on the Content-Type defined the data that follows
the header declaration :
 • If it is HTML that follows then the CGI script must output
standard HTML syntax.
 Example: To produce aWeb page that the server sends to a
browser with a simple line of text ”HelloWorld!” . A CGI script
must output:
 Content-Type: text/html
 <html>
 <head>
 <title>Hello, world!</title>
 </head>
 <body>
 <h1>Hello, world!</h1>
 </body>
 </html>
#!/usr/bin/perl
print "Content-Type: text/htmlnn";
print "<html> <head>n";
print "<title>Hello, world!</title>";
print "</head>n";
print "<body>n";
print "<h1>Hello, world!</h1>n";
print "</body> </html>n";

More Related Content

What's hot

Rails 4 & server sent events
Rails 4 & server sent eventsRails 4 & server sent events
Rails 4 & server sent events
Piotr Karbownik
 
Angularjs & REST
Angularjs & RESTAngularjs & REST
Angularjs & REST
Corley S.r.l.
 
Wcf routing kt
Wcf routing ktWcf routing kt
Wcf routing kt
Krunal Trivedi
 
Common Gateway Interface
Common Gateway InterfaceCommon Gateway Interface
Common Gateway Interface
Piero Fraternali
 
2310 b 06
2310 b 062310 b 06
2310 b 06
Krazy Koder
 
Scalable Reliable Secure REST
Scalable Reliable Secure RESTScalable Reliable Secure REST
Scalable Reliable Secure REST
guestb2ed5f
 
ASP.NET MVC and ajax
ASP.NET MVC and ajax ASP.NET MVC and ajax
ASP.NET MVC and ajax
Brij Mishra
 
2310 b 13
2310 b 132310 b 13
2310 b 13
Krazy Koder
 
Server-Sent Events (real-time HTTP push for HTML5 browsers)
Server-Sent Events (real-time HTTP push for HTML5 browsers)Server-Sent Events (real-time HTTP push for HTML5 browsers)
Server-Sent Events (real-time HTTP push for HTML5 browsers)
yay w00t
 
Webinar slides "Building Real-Time Collaborative Web Applications"
Webinar slides "Building Real-Time Collaborative Web Applications"Webinar slides "Building Real-Time Collaborative Web Applications"
Webinar slides "Building Real-Time Collaborative Web Applications"
Sachin Katariya
 
Common gateway interface
Common gateway interfaceCommon gateway interface
Common gateway interface
Anandita
 
Inner core of Ajax
Inner core of Ajax Inner core of Ajax
Inner core of Ajax
Muhammad Junaid Ansari
 
How a Proxy Server Works
How a Proxy Server WorksHow a Proxy Server Works
How a Proxy Server Works
Mer Joyce
 
Writing HTTP Middleware In Go
Writing HTTP Middleware In GoWriting HTTP Middleware In Go
Writing HTTP Middleware In Go
Shiju Varghese
 
SFDC Outbound Integrations
SFDC Outbound IntegrationsSFDC Outbound Integrations
SFDC Outbound Integrations
Sujit Kumar
 
Web service testing_final.pptx
Web service testing_final.pptxWeb service testing_final.pptx
Web service testing_final.pptx
vodqancr
 
Time to REST: testing web services
Time to REST: testing web servicesTime to REST: testing web services
Time to REST: testing web services
Iurii Kutelmakh
 
40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently
postmanclient
 
XAJA - Reverse AJAX framework
XAJA - Reverse AJAX frameworkXAJA - Reverse AJAX framework
XAJA - Reverse AJAX framework
Sri Prasanna
 
Fm 2
Fm 2Fm 2
Fm 2
sambavade
 

What's hot (20)

Rails 4 & server sent events
Rails 4 & server sent eventsRails 4 & server sent events
Rails 4 & server sent events
 
Angularjs & REST
Angularjs & RESTAngularjs & REST
Angularjs & REST
 
Wcf routing kt
Wcf routing ktWcf routing kt
Wcf routing kt
 
Common Gateway Interface
Common Gateway InterfaceCommon Gateway Interface
Common Gateway Interface
 
2310 b 06
2310 b 062310 b 06
2310 b 06
 
Scalable Reliable Secure REST
Scalable Reliable Secure RESTScalable Reliable Secure REST
Scalable Reliable Secure REST
 
ASP.NET MVC and ajax
ASP.NET MVC and ajax ASP.NET MVC and ajax
ASP.NET MVC and ajax
 
2310 b 13
2310 b 132310 b 13
2310 b 13
 
Server-Sent Events (real-time HTTP push for HTML5 browsers)
Server-Sent Events (real-time HTTP push for HTML5 browsers)Server-Sent Events (real-time HTTP push for HTML5 browsers)
Server-Sent Events (real-time HTTP push for HTML5 browsers)
 
Webinar slides "Building Real-Time Collaborative Web Applications"
Webinar slides "Building Real-Time Collaborative Web Applications"Webinar slides "Building Real-Time Collaborative Web Applications"
Webinar slides "Building Real-Time Collaborative Web Applications"
 
Common gateway interface
Common gateway interfaceCommon gateway interface
Common gateway interface
 
Inner core of Ajax
Inner core of Ajax Inner core of Ajax
Inner core of Ajax
 
How a Proxy Server Works
How a Proxy Server WorksHow a Proxy Server Works
How a Proxy Server Works
 
Writing HTTP Middleware In Go
Writing HTTP Middleware In GoWriting HTTP Middleware In Go
Writing HTTP Middleware In Go
 
SFDC Outbound Integrations
SFDC Outbound IntegrationsSFDC Outbound Integrations
SFDC Outbound Integrations
 
Web service testing_final.pptx
Web service testing_final.pptxWeb service testing_final.pptx
Web service testing_final.pptx
 
Time to REST: testing web services
Time to REST: testing web servicesTime to REST: testing web services
Time to REST: testing web services
 
40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently
 
XAJA - Reverse AJAX framework
XAJA - Reverse AJAX frameworkXAJA - Reverse AJAX framework
XAJA - Reverse AJAX framework
 
Fm 2
Fm 2Fm 2
Fm 2
 

Similar to Cache control directive

Python cgi programming
Python cgi programmingPython cgi programming
CGI by rj
CGI by rjCGI by rj
Ecom 1
Ecom 1Ecom 1
Peer Cache for Configuration Manager clients
Peer Cache for Configuration Manager clientsPeer Cache for Configuration Manager clients
Peer Cache for Configuration Manager clients
Karthick Jokirathinam
 
Cgi
CgiCgi
contentDM
contentDMcontentDM
contentDM
spacecowboyian
 
Unit 02: Web Technologies (2/2)
Unit 02: Web Technologies (2/2)Unit 02: Web Technologies (2/2)
Unit 02: Web Technologies (2/2)
DSBW 2011/2002 - Carles Farré - Barcelona Tech
 
Brushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersBrushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developers
ONE BCG
 
Cgi
CgiCgi
Unit 1st and 3rd notes of java
Unit 1st and 3rd notes of javaUnit 1st and 3rd notes of java
Unit 1st and 3rd notes of java
Niraj Bharambe
 
Subscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robotsSubscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robots
dbpublications
 
15.web document types.pdf bdgjrjdhdhsgbdidh
15.web document types.pdf bdgjrjdhdhsgbdidh15.web document types.pdf bdgjrjdhdhsgbdidh
15.web document types.pdf bdgjrjdhdhsgbdidh
KomaliGuptha1
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Server
webhostingguy
 
Using communication and messaging API in the HTML5 world - GIl Fink, sparXsys
Using communication and messaging API in the HTML5 world - GIl Fink, sparXsysUsing communication and messaging API in the HTML5 world - GIl Fink, sparXsys
Using communication and messaging API in the HTML5 world - GIl Fink, sparXsys
Codemotion Tel Aviv
 
Consuming GRIN GLOBAL Webservices
Consuming GRIN GLOBAL WebservicesConsuming GRIN GLOBAL Webservices
Consuming GRIN GLOBAL Webservices
Edwin Rojas
 
Penetration Testing Report
Penetration Testing ReportPenetration Testing Report
Penetration Testing Report
Aman Srivastava
 
Chapter5-Bypass-ClientSide-Control-Presentation.pptx
Chapter5-Bypass-ClientSide-Control-Presentation.pptxChapter5-Bypass-ClientSide-Control-Presentation.pptx
Chapter5-Bypass-ClientSide-Control-Presentation.pptx
ilhamilyas5
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
oazabir
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19
Vivek chan
 
Client control
Client controlClient control
Client control
Sireesh K
 

Similar to Cache control directive (20)

Python cgi programming
Python cgi programmingPython cgi programming
Python cgi programming
 
CGI by rj
CGI by rjCGI by rj
CGI by rj
 
Ecom 1
Ecom 1Ecom 1
Ecom 1
 
Peer Cache for Configuration Manager clients
Peer Cache for Configuration Manager clientsPeer Cache for Configuration Manager clients
Peer Cache for Configuration Manager clients
 
Cgi
CgiCgi
Cgi
 
contentDM
contentDMcontentDM
contentDM
 
Unit 02: Web Technologies (2/2)
Unit 02: Web Technologies (2/2)Unit 02: Web Technologies (2/2)
Unit 02: Web Technologies (2/2)
 
Brushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersBrushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developers
 
Cgi
CgiCgi
Cgi
 
Unit 1st and 3rd notes of java
Unit 1st and 3rd notes of javaUnit 1st and 3rd notes of java
Unit 1st and 3rd notes of java
 
Subscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robotsSubscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robots
 
15.web document types.pdf bdgjrjdhdhsgbdidh
15.web document types.pdf bdgjrjdhdhsgbdidh15.web document types.pdf bdgjrjdhdhsgbdidh
15.web document types.pdf bdgjrjdhdhsgbdidh
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Server
 
Using communication and messaging API in the HTML5 world - GIl Fink, sparXsys
Using communication and messaging API in the HTML5 world - GIl Fink, sparXsysUsing communication and messaging API in the HTML5 world - GIl Fink, sparXsys
Using communication and messaging API in the HTML5 world - GIl Fink, sparXsys
 
Consuming GRIN GLOBAL Webservices
Consuming GRIN GLOBAL WebservicesConsuming GRIN GLOBAL Webservices
Consuming GRIN GLOBAL Webservices
 
Penetration Testing Report
Penetration Testing ReportPenetration Testing Report
Penetration Testing Report
 
Chapter5-Bypass-ClientSide-Control-Presentation.pptx
Chapter5-Bypass-ClientSide-Control-Presentation.pptxChapter5-Bypass-ClientSide-Control-Presentation.pptx
Chapter5-Bypass-ClientSide-Control-Presentation.pptx
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19
 
Client control
Client controlClient control
Client control
 

Recently uploaded

Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
jpupo2018
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 

Recently uploaded (20)

Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 

Cache control directive

  • 1. Dr . Majzoob Kamal Eldein Omer
  • 2.  Provide finer cache control to both sender and recipient  A new general Cache-Control directive that must be obeyed!  Cache Proxy, Client browser and server are obligated to obey Some of the directives in requests:  Cache-control: no-cache Client forces up-to-date check with origin server.
  • 3.  Cache-control: max-age=1000 Client (user or intermediate cache) is prepared to accept object without up-to-date check if age is < 1000 seconds.  Overrides expires: If document has not expired but document age is > max-age, then cache performs an up- to-date check.
  • 4.  Cache-control : public The object is cacheable by client and network caches…basically anywhere!  Cache-control: private The object can be cached only by the client.  Cache-control: max-age =1000 Server imposes up-to-date check after 1000 seconds. Similar to Expires header.
  • 5. Server control:  If origin server doesn’t want the object cached, it can put in response cache-control:private .  If origin server wants an up-to-date check for each request, it can put in response cache-control: proxy- revalidate .  If origin server wants up-to-date check once the object age > 1000, it can put in response: cache-control: max- age=1000
  • 6. Browser control:  If client wants an up-to-date check even if the object has not expired, it puts in request: Cache-control: no- cache .  In client is willing to accept the object that is less than 1000 seconds old without an up-to-date check, it can put in request: Cache-control: max-age=1000 .
  • 7.
  • 8.  CGI stands for Common Gateway Interface.  CGI is a standard programming interface to Web servers that gives us a way to make our sites dynamic and interactive.  CGI is not a programming language. It is just a set of standards (protocols.)  CGI can be implemented in an interpreted language such as PERL or in a compiled language such as C.
  • 9.  CGI programs work as follows:  STEP 1 (On the client side): Get Information from the user (using HTML forms, SSI, Java Applet, …,etc).  STEP 2 (On the server side): Process the data, connect to DATABASE, search for PATTERNS, …,etc.  STEP 3 (On the server side): Send the result of computation back to the client.
  • 10.
  • 11.  The steps involved in preparing a CGI program for work. 1. Contact your Web host to find out where you should put your CGI programs on the server. Usually it will be a directory on the server named “cgi-bin”. 2. Set up the access permission of directory “cgi-bin”
  • 12. 3- Set up the access permission of the CGI program 4- Test your CGI program from the server command line to make sure it works perfectly before publishing it.
  • 13.  <form action=“cgi-prog.cgi” method=“POST”> . . . </form>  Two HTTP methods are available:  GET  POST  The CGI program will be invoked every time you the button SUBMIT is clicked.
  • 14.  GET Method the data passed within the query string of URL : for example: http://std.edu/info/program?querystring the data sent after the “?” POST Method : The data sent via entity body
  • 15.  CGI Script Output Format :  In whatever language a CGI script is programmed it MUST send information back in the following format:  The Output Header  A Blank Line  The Output Data
  • 16.  Content-Types  The following are common formats/content- types : Format Content-Type  HTML text/html  Gif image/gif  JPEG image/jpeg
  • 17.  Depending on the Content-Type defined the data that follows the header declaration :  • If it is HTML that follows then the CGI script must output standard HTML syntax.  Example: To produce aWeb page that the server sends to a browser with a simple line of text ”HelloWorld!” . A CGI script must output:  Content-Type: text/html  <html>  <head>  <title>Hello, world!</title>  </head>  <body>  <h1>Hello, world!</h1>  </body>  </html>
  • 18. #!/usr/bin/perl print "Content-Type: text/htmlnn"; print "<html> <head>n"; print "<title>Hello, world!</title>"; print "</head>n"; print "<body>n"; print "<h1>Hello, world!</h1>n"; print "</body> </html>n";