List of free web storage providers. Save up to 50 GB online.


Free HTML code reduction (.asp)
The basic idea of this script is to remove useless information from your HTML pages, so that they may be transfer to your client faster (and you will also contribute to reduce wasting a bit of energy). 

This 1.0 version will only remove redundant spaces. Very often, HTML editors will include in the HTML code a huge number of useless spaces (sometimes up to 25% of file´s size). This script will remove them. 
 

code-reduction.asp
<HTML><HEAD><TITLE>Code reduction</TITLE></HEAD><BODY BGCOLOR=FFFFFF>
 

<%
if request.form("username")="myusername" AND request.form("password")="mypassword" then
FolderName = request.form("FolderName")
response.write ("<BR><b>Code Reduction: pages which has been reduced</b><BR>")
FolderToCheck = "e:\mydir1\mydir2\" & FolderName & "\"
 Dim fs, f, f1, fc, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFolder(FolderToCheck)
 Set fc = f.Files
 For Each f1 in fc

         Wfile = f1.name
          if right(Wfile, 4)=".htm" OR right(Wfile, 5)=".html" then
            Wfile2 = FolderToCheck & Wfile
            Set fs = CreateObject("Scripting.FileSystemObject")
            Set a = fs.OpenTextFile(Wfile2)
            ct = a.ReadAll
            bytesct=len(ct)
            a.close
            Do While instr(ct,"  ")>0
            ct=replace(ct,"  "," ")
            Loop
            bytesct2=len(ct)
            Set a = fs.CreateTextFile(Wfile2,TRUE)
            a.write(ct)
            a.close
            response.write (Wfile2 & ":  &nbsp;" & bytesct2  & " bytes (" & bytesct & " before code reduction)<BR>")
          end if

Next

else
%>
<CENTER>
<Form Action=codereduction.asp method=post>
<TABLE BORDER=0 BGCOLOR=AAAAFF><TR><TD>
<TABLE BORDER=0>
<TR><TD>FolderName: </TD><TD><input type=text name=FolderName size=30><BR><font size=1>"directory"  or "dyrectory1\directory".</font> </TD></TR>
<TR><TD>Username:  </TD><TD><input type=text name=username size=30></TD></TR>
<TR><TD>Password:  </TD><TD><input type=text name=password size=30></TD></TR>
</TABLE>
</TD></TR></TABLE>
<input type=Submit Value=Send>
</form>
<BR>
Free script provide  by <A href=http://www.asptutorial.info>AspTutorial.info</a>
</CENTER>

<% end if  %>

</BODY></HTML>

For security porpouses, this scrips will ask you for a username ("myusername") and password ("mypassword"), so you will need to introduce your username and password to use this scripts. In order to customized this script you will need to introduce the path to your main directory ("e:\mydir1\mydir2\"). 

When running this script, it will be request to you the username, password and the directory in which you want to reduce the code of your ".htm" and ".html" pages. Those data will be request with a form like the one bellow (this one is not functional).

FolderName: 
"directory" or "dyrectory1\directory".
Username: 
Password: 

Free script provide by Asptutorial.info

NOTE: Your server may not allow you to open, read, and create new files in your site (this option may not be allowed or may be allowed only in some specific directories). 
 

Tutorial home page

2008@ AspTutorial.info. All rights reserved.