ASP 101 - Active Server Pages 101 - Web01
The Place ASP Developers Go!

Please visit our partners


Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash





Script Output:

Retreived HTML (Not Cached):

<html>
<head>
<title>ASP 101 Http Request Sample Page</title>
</head>
<body>
<h1>ASP 101 Http Request Sample Page</h1>
<p>
This is a sample HTML page that we threw together
to illustrate doing an http request via ASP.
</p>
<p>
This file was served at: 11/19/2010 10:52:17 AM (Webserver Time)
</p>
</body>
</html>

The cached data will expire at: 11/19/2010 10:53:16 AM

The content in the box is retrieved via HTTP and is then cached for up to one minute. As you refresh the page, pay attention to the timestamp in the returned HTML. For comparison, it is currently: 11/19/2010 10:52:16 AM


ASP HTML Download            FAQ

ASP+ Version

This sample examines the caching side of things. For more details on the HTTP request aspect of the code, see our two previous HTTP samples:

For this sample I've used a slightly modified version of the code I presented in my article: A Simple Method for Caching HTTP Requests. The main difference is that I calculate the expiration date/time up front in this method. I like this verion better since there's less calculation going on with each check of whether or not we've reached the expiration and we're also able to more easily display when the cached data will expire.


Samples

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers