views:

66

answers:

4

Are there any tools that can automatically generate static HTML pages for my currently dynamic website. i.e. generate a unique HTML page for each unique url of my dynamic website.

It would be great if I do not have to change my dynamic web-site code for this.

A: 

In your browser, you can do File->Save As.

If you are willing to accept Internet Explorer, you can create a program (doesn't matter what language you use, but .NET and VB can do this easily) which uses IE's component. Have the component visit your site and then programatically save the HTML via IE's API.

MrValdez
+1  A: 

You could use wget in a script or batch file to retrieve the pages. No code changes would be necessary. wget will mirror the directory structure of your site so you can use this as-is (assuming you want to cache the whole site) or you can just copy the files that you want to cache.

jdigital
+1  A: 

You can use Teleport Pro to crawl entire website and save full copy of it locally keeping its structure (if it is).

Mr.ElectroNick
+1  A: 

What language is your dynamic site written in? PHP, for example, works well with a number of caching libraries. I assume your intent is to reduce the number of times these dynamically-generated-yet-prettymuch-static pages have to be output?

Another method (again, PHP because you didn't specify) would be to prepend and append a set of scripts that could handle caching via the ob_buffer

prepend pseudo-code:

if(cache exists and is not too old) {
    serve cached file
    exit();
}
start buffer

append pseudo-code

get buffer contents and save to cache file
echo buffer contents
yaauie
Website code written in Java.
Kishnan