ASP 101 - Active Server Pages 101 - Web05
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
International

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: 8/7/2008 7:23:18 PM (Webserver Time)
</p>

</body>
</html>

The cached data will expire at: 8/7/2008 7:24:17 PM

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: 8/7/2008 7:23:17 PM


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



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers