Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 708
  • Last Modified:

ASP vs. HTML

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
btphelps
Asked:
btphelps
1 Solution
 
RanaHossainCommented:
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
 
AmericanDogmaCommented:
Also the speed difference would be very very miniamla on anythink but a corporate level site
0
 
coljeCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
KovisCommented:
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
 
webwomanCommented:
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
 
draganstCommented:
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
 
miskateCommented:
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
 
whammyCommented:
Does this answer your question? Use ASP! ;-)

--> Don't give me any points, but please award them to the most useful answer above! <--
0
 
btphelpsAuthor Commented:
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
 
msmalesCommented:
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
 
nagvivCommented:
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
 
btphelpsAuthor Commented:
Thanks for all the info. I appreciate the help!

Brian
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now