Avatar of william007
william007

asked on 

About If-Modified-Since

I type in the following in command prompt
telnet www.google.com 80

and type the following as the request html header
GET / HTTP/1.1
Host: www.google.com
If-Modified-Since: Mon, 19 Mar 2007 02:43:31 GMT

and sent, but it always return me http/1.1 200 OK and the entire webpage.  

Is my syntax correct? Can somebody give me an example that will return http/1.1 304 modified with the correct syntax?
Web ServersWeb ApplicationsWeb Languages and Standards

Avatar of undefined
Last Comment
JamesCssl
ASKER CERTIFIED SOLUTION
Avatar of JamesCssl
JamesCssl
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of william007
william007

ASKER

Thanks, Your example is working great:)

But if I try to send
GET / HTTP/1.1
Host: www.cyberpear.com
If-Modified-Since: Wed, 21 Mar 2007 02:43:31 GMT

Again it gives me http/1.1 200 OK. 21 Mar 2007 is later than 17 Dec 2006, but why doesn't give me the same result?
Also, how do you know what date to put there?

I am trying to write a proxy server that check the pages in its cache whether has been modified, hence I need to understand these things in details.
Avatar of william007
william007

ASKER

Also I discover that, for the images, it will always give me the same result, ie 304 not modified even I put different date, again, what is the reason?

GET http://www.new-dream.de/image/wallpaper/computer/apple/apple_14.jpg HTTP/1.1
Host: www.new-dream.de
If-Modified-Since: Wed, 20 Mar 2007 02:43:31 GMT

GET http://www.new-dream.de/image/wallpaper/computer/apple/apple_14.jpg HTTP/1.1
Host: www.new-dream.de
If-Modified-Since: Wed, 20 Feb 2007 02:43:31 GMT
SOLUTION
Avatar of JamesCssl
JamesCssl
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Web Languages and Standards
Web Languages and Standards

Web development can range from developing the simplest static single page of plain text to the most complex web-based internet applications, electronic businesses, and social network services using a wide variety of languages and standards, including the familiar HTML, JavaScript and jQuery, ASP and ASP.NET, PHP, ColdFusion, CSS, PHP, Flex and Flash, but also the implementation of a broad list of standards including XML, WSDL, SSDL, VoiceXML and many more.

40K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo