?
Solved

ASP vs. HTML

Posted on 2003-02-24
12
Medium Priority
?
705 Views
Last Modified: 2012-05-04
I am updating a client's web site. It queries an Access database. The pages are currently set up as .ASP pages, as in the following example:

<% @Language = "VBScript" %>

<!-- #include virtual="/InnDB/Common/header.inc" -->
<!-- #INCLUDE VIRTUAL="/InnDB/Common/db.inc" -->
<!-- #include virtual="/index.inc" -->
<!-- #include virtual="/InnDB/Common/footer.inc" -->

My question is, for those pages that are pure HTML and not database delivered, is there any advantage or disadvantage to using ASP over HTML? Is one faster to deliver to the client browser than the other?

Thanks.

Brian Phelps  
0
Comment
Question by:btphelps
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 4

Expert Comment

by:RanaHossain
ID: 8013477
brian.. the process is like this..
html is rendered on client browser.
ASP is processed on server, which then writes the HTML.

so, by changing the pages to HTML, it will be FASTER.

so thats the advantage. Disadvantages... well to start with...

<!-- #include virtual="/InnDB/Common/header.inc" -->

this file has the header html... so at any point if you would like to change the header, you change in one file, and voila. Same deal with footer.inc

I believe if you have a large site, include files are well worth it. However, I would suggest you change the inc extension to asp for security issues.

more advantage of having asp is you can have a lot more user customization.

hope that helps.
0
 
LVL 3

Expert Comment

by:AmericanDogma
ID: 8013609
Also the speed difference would be very very miniamla on anythink but a corporate level site
0
 
LVL 2

Expert Comment

by:colje
ID: 8013745
For pages that are pure HTML there may be a minor performance benefit as the server can send the page without the ASP engine processing it first.

Using ASP's can also give additional functionality such as opening a random image each time the page is loaded. Conditional formatting based on different conditions such as the time or value of a cookie.

Also as RanaHossain says above using an ASP include for headers and footers can save time manually formatting every page later.
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 2

Accepted Solution

by:
Kovis earned 200 total points
ID: 8014306
The basic rule with ASP pages is that rendering static HTML is fast and it slows down when you make your first database query. The difference between totally static HTML page and ASP page (that renders static HTML) is so minimal, that there is no sense using HTML pages.

With ASP page you can split your HTML to pieces and make reusable components and include them into your document (just like you have done). When you want to change the looks of your site, you can control it through these components. Handy.

You could also set your image paths (or other paths) as application variables and if you move your images to somewhere else, just update the application variable.

With ASP page, you can also log every page request. Make an ASP sniffer and log everything you find to a safe place.  

Then if you have pages that need rights control, the only reliable way is to use ASP pages. Check the session info in the beginning of the page before rendering.

Usually you develope ASP pages with Visual Interdev. Ok, just use Source Safe with it, and you can also get the version history of your page. Sure you can write HTML pages also with VI, but usually you don't (since it isn't the best possible editor for editing HTML).
0
 
LVL 19

Expert Comment

by:webwoman
ID: 8016933
The bigger question is -- do you actually have any pages that are PURE HTML? If you're using includes for standard pieces (headers/footers/navigation), I suspect you have few, if any, pure HTML pages.

If they are only HTML, and will NEVER need any server side support, they could be HTML instead of ASP. However, if at a later point you find they DO need server side support, you'll have to change every link to them in your site because you'll have to change the file extension.

Just a point to consider...
0
 

Expert Comment

by:draganst
ID: 8018078
In IIS 5 there is now no overhead in naming pure html asp, so call your html files .ASP if you think you may modify them to contain server side code at a later date.

But remove all the includes as this will slow down the processing.

Any context switching at all will incur a processing cost

eg

<%

%>

is a context swtich between html and asp, even if its empty.

weigh up all your options of what you want to do in future changes to site that may require asp processing, and the ease of editing and seperation than suffix changes give you.  Its your choice, but the technical answer is above.

better still change to asp.net, just cos I love it. ;-)
0
 
LVL 2

Expert Comment

by:miskate
ID: 8021197
You don't need asp to use #include. SSI can be enabled by giving your pages a .shtml extension (or by setting your web server up to enable SSI on html or htm extensions). Of course if any of the includes have ASP in them you need the final page to have a .asp extension.

As draganst says though, it doesn't make a lot of difference with IIS5 anway.
0
 
LVL 4

Expert Comment

by:whammy
ID: 8021540
Does this answer your question? Use ASP! ;-)

--> Don't give me any points, but please award them to the most useful answer above! <--
0
 

Author Comment

by:btphelps
ID: 8022136
Sounds like ASP might be ok to use. I use DreamWeaver to compose my web pages, so it'll take an intermediate step to carve the resulting pages into includes for ASP purposes. I'll get back to you all after I've worked on this a bit farther tomorrow.
0
 
LVL 1

Expert Comment

by:msmales
ID: 8030722
Use ASP that contains dynamic information (i.e. using dynamic database field, generate date/time, etc.)

Use HTML for just static information (or ASP if you might start including dynamic information in the future)
0
 
LVL 1

Expert Comment

by:nagviv
ID: 8063246
Dear btphelps,

Although pure HTML pages are faster than ASp pages that deliver html pages. BUt the speed is conceivable only when the content is great. So for most applications, ap pages rendering HTML content would do fine. BUt then using ASP or any such server-side scripting would allow you to dynamically generate content at a later point of time. Also, you can use you ASP page to deliver highly customized output. For example, you can generate content in different languages.
Also by using "includes" you break your codes into smaller programs that can be maintained singly and simply. That is to say, you can use these includes in other asp codes that require similar fucntionality.

Regards,

G. Nagraj
0
 

Author Comment

by:btphelps
ID: 8066040
Thanks for all the info. I appreciate the help!

Brian
0

Featured Post

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question