btphelps
asked on
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/hea der.inc" -->
<!-- #INCLUDE VIRTUAL="/InnDB/Common/db. inc" -->
<!-- #include virtual="/index.inc" -->
<!-- #include virtual="/InnDB/Common/foo ter.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
<% @Language = "VBScript" %>
<!-- #include virtual="/InnDB/Common/hea
<!-- #INCLUDE VIRTUAL="/InnDB/Common/db.
<!-- #include virtual="/index.inc" -->
<!-- #include virtual="/InnDB/Common/foo
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
Also the speed difference would be very very miniamla on anythink but a corporate level site
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The bigger question is -- do you actually have any pages that are PURE HTML? If you're using includes for standard pieces (headers/footers/navigatio n), 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...
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...
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. ;-)
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. ;-)
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.
As draganst says though, it doesn't make a lot of difference with IIS5 anway.
Does this answer your question? Use ASP! ;-)
--> Don't give me any points, but please award them to the most useful answer above! <--
--> Don't give me any points, but please award them to the most useful answer above! <--
ASKER
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.
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)
Use HTML for just static information (or ASP if you might start including dynamic information in the future)
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
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
ASKER
Thanks for all the info. I appreciate the help!
Brian
Brian
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/hea
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.