[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Cacheing cgi

Posted on 2000-03-06
2
Medium Priority
?
234 Views
Last Modified: 2013-12-25
I have a cgi script which creates a HTML page with graphics. Everytime the script loads, the graphics would load again.
How do I cache the graphics in a CGI generated html page?
0
Comment
Question by:Aphroditus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
makerp earned 200 total points
ID: 2587557
in the header you need set the expiry of the page.

in perl using the cgi.pm module the following will make a page expire in 3 days

use CGI;

$query = new CGI;

print $query->header(-expires=>'+3d');

+30s                              30 seconds from now
        +10m                              ten minutes from now
        +1h                               one hour from now
        -1d                               yesterday (i.e. "ASAP!")
        now                               immediately
        +3M                               in three months
        +10y                              

if your using C/C++ etc then you will need to send this header out in the response to the client before your body of the doc goes out. w3.org will give you the correct header format for the date of expiry etc.
0
 
LVL 10

Expert Comment

by:makerp
ID: 2589011
you can use -expires=>now as the parameter for expriry if you want it not to be cashed. also i think that browser settings override this cash.

i.e if your browsers set to always get a new page then cashed items are ignored.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question