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

  • Home
  • SEARCH
  • 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 5985441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:31:50+00:00 2026-05-22T22:31:50+00:00

I’ve recently taken over development of a classic ASP application after the sole developer

  • 0

I’ve recently taken over development of a classic ASP application after the sole developer on the project left. There is the following bit of code which for the life of me I can’t work out the benefit of, maybe some of you more experienced guys and gals could shed some light on the logic?

In the head section of our default.asp page, the code calls an another asp page with a parameter in order to load/include some files. This asp page reads the parameter and then selects an array of files. It then loops through this array, and for each object in the array, it performs the following function:

Sub SendFile(ByRef sFilename)
    If Len(sFilename) = 0 Then
        Exit Sub
    End If

    If IsEmpty([__SendFile_sSuffixCompressed]) Then
        [__SendFile_sSuffixCompressed] = ".js"
    End If

    If IsEmpty([__SendFile_fso]) Then
        Set [__SendFile_fso] = Server.CreateObject("Scripting.FileSystemObject")
    End If

    Dim sPath
    sPath = Server.MapPath(sFilename)
    Dim stream
    Dim sData
    Set stream = Server.CreateObject("ADODB.Stream")
    Response.Write sPath
    With stream
        .Charset = "utf-8"
        .Type = 2
        .Open
        .LoadFromFile sPath
        sData = .ReadText
        .Close
    End With

    OurResponse.Write sData
End Sub

I would have thought this would be a way of dynamically loading those files, but wouldn’t it be much easier just to have a conditional IF block around a normal <script src"...> line?

  • 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-05-22T22:31:51+00:00Added an answer on May 22, 2026 at 10:31 pm

    A <script src"...> line will load a script from a valid URL, but perhaps this is a way for the web application to include script files on the server that are elsewhere on the filesystem not directly accessible by public URL?

    I am not sure why you would want to do this because one could still call this ASP page from a public URL to get the scripts however so it really wouldn’t buy you security, just obfuscation.

    I am personally a huge fan of deleting code whenever possible. Try replacing this functionality with a conditional script tag like you mentioned on a development environment and test for changes. If their is any hidden reasons for this nonsense then you should be able to find them.

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

Sidebar

Related Questions

I need to clean up various Word 'smart' characters in user input, including but
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
i want to parse a xhtml file and display in UITableView. what is the
public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim

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.