But what about readability?Ok, let's say you're with me on the bandwidth issue. But now the code isn't readable, right? Here's the real answer (using my Out function to wrap Response.Write): <%@ Language=JavaScript %>
<%
// the statement below enables buffering of the data sent to the browser.
// see http://learnasp.com/learn/whybuffer.asp
%>
<% Response.Buffer=true %>
<%
Out ( '<html>' );
Out ( '<head>' );
Out ( '<title>My page</title>' );
Out ( '</head>' );
Out ( '<body>' );
Out ( 'We're in "HTML mode" here...' );
// output the name of the script itself
var sScript = Request.ServerVariables ( "SCRIPT_NAME" );
Out ( '<p>I am called ' + sScript );
Out ( '<p>...and here.' );
Out ( '</body>' );
Out ( '</html>' );
%> |
Indentation, comments, efficiency. What more could you possibly want? You want MORE? Part 4: Security... |