Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8172245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:43:16+00:00 2026-06-06T21:43:16+00:00

I am running a classic vbscript ASP site with a SQL2008 database. There are

  • 0

I am running a classic vbscript ASP site with a SQL2008 database. There are a few pages that are processor-heavy, but don’t actually change that often. Ideally, I would like the server to process these once a night, perhaps into HTML pages, that can then fly off the server, rather than having to be processed for each user.

Any ideas how I can make this happen?

The application itself works very well, so I am not keen to rewrite the whole thing in another scripting language, even if classic asp is a bit over the hill!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:43:18+00:00Added an answer on June 6, 2026 at 9:43 pm

    Yes :

    You didn’t specify which parts of the pages are “processor heavy” but I will assume it’s the query and processing of the SQL data. One idea is to retrieve the data and store it as a cached file, in the filesystem. XML is a good choice for the data format.

    Whereas your original code is something like this:

     (psuedocode)
     get results from database
     process results to generate html file
    

    …your modified code can look like this:

    check if cache file exists
    if not exist
       get results from database
       store results in cache file
    get results from cache file
    process results to generate html file. 
    

    This is a general caching approach and can be applied to a situation where you’ve got
    query parameters determining the output. Simply generate the name of the cache file based on all the constituent parameters. So if the results depend on query parameters named p1 and p2, then when p1 and p2 have the values 1234 and blue respectively, the cache file might be named cache-1234-blue.xml . If you have 5 distinct queries, you can cache them as query1-1234-blue.xml, query2-1234-blue.xml and so on.

    You need not do this “nightly”. You can include in your code a cache lifetime, and in place of the “if cache file exists” test, use “if cache file exists and is fresh”. To do that just get the last modified timestamp on the cache file, and see if it is older than your cache lifetime.

    Function FileOlderThan(fname, age)
        'function returns True if the file is older than the age,
        '  specified in minutes.
        Dim LastModified, FSO, DateDifference
    
        Set FSO = CreateObject("Scripting.FileSystemObject")
        LastModified = FSO.GetFile(fname).DateLastModified
        DateDifference = DateDiff("n", LastModified, Now())
        If DateDifference > age Then
            FileAge = False
        Else
            FileAge = True
        End If
    End Function
    
    
    fname = Server.MapPath(".") & cacheFileName
    If FileOlderThan(fname, 10) Then
       ... retrieve fresh data ...
    End If 
    

    This could be 10 minutes, 10 hours, 10 requests, whatever you like.

    I said above that XML is a good choice for the data format in the cachefile. ADO has a SaveAsXML method, and you can also generate XML directly from SQL2008 using the FOR XML clause appended to the query.


    If the “processor heavy” part is not the query and retrieval, but is the generation of the html page, then you could apply the same sort of approach, but simply cache the html file directly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a Classic ASP (VBScript) site that's running on a Windows 2008
I have a legacy web-site that I am maintaining (built mostly in classic ASP
I have a shopping cart website running classic ASP that needs help during the
I'm getting a Script Error Exception randomly from a classic asp site we're running
There are a lot of webs still using classic ASP instead of ASP.NET but
I have a windows 2003 / IIS 6.5 machine running a classic ASP site.
I need to get a classic asp project up and running but do not
I have IIS running under Windows XP. I have .html files with classic ASP
Running SQL Server 2008 (not R2). I have a few reports that have URLs
i've created a little activeX dll under vb6 which i'm running under classic asp.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.