Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

minimizing size of an html page

Status
Not open for further replies.

tzigone

MIS
Aug 11, 2003
42
TR
hello,
i have a site which is built by c#. the size of one page is abot 60 kb. it was worse than 60 kb before. i have changes pictures to gif from jpg. now there are custom controls and user controls in the page and there is an imagemap. could you give any idea to minimize the size of this page?is it possible to compress the page in a way such that the site fastens for each pagepostback?
thank you.
 
Some general tips are:

1. don't use <font>. Instead use CSS external or embedded CSS (not inline).

2. markup for layout tables can be quite bulky. Use a tableless layout. See for example:

3. Make sure your images are 72dpi or 96dpi. JPEG may actually be better for some types of images. Make sure the quality is set to about 60%.

Good luck.
 
i have learnt that css2 can be used instead of tables. can you suggest effective tutorials about css2?
 
what is the meaning of using style tag in html code instead of using external style sheets? is there any difference or benefit?
 
tzigone wrote: &quot;what is the meaning of using style tag in html code instead of using external style sheets? is there any difference or benefit?&quot;

If you have CSS rules that are used on many pages, then put your CSS rules into an external file (external CSS). If you create CSS rules just for a specific page, then put them into a style tag (embedded CSS).
 
There are two main benefits of putting your CSS into a separate file:

1) Speed. The browser will download the CSS file when it reads the first page in your site, but it makes a local copy to use when reading subsequent pages. Thus your pages load faster overall because you're not downloading all that CSS for every page.

2) Convenience. If you want to change something, you only have one place to do it. Say you decide you want to have all your text in &quot;Verdana&quot;, easy! - just change a couple of lines in your style sheet and it's done. Imagine having to edit every page (or, worse still, o it with <font> tags...)

-- Chris Hunt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top