Forum Moderators: phranque

Message Too Old, No Replies

Page File Size

Too large?

         

myrrh

9:07 pm on Sep 13, 2008 (gmt 0)

10+ Year Member



I have one page that's over 150k and I'm wondering how important it is that I do something to make it smaller.

It's number one in Google for a very popular term and I don't want to jeopardize it.

The users of this page are likely to be more computer savvy than average, so I would think very few users are on dial-up. BTW, is anyone on dial-up any more?

tonynoriega

10:04 pm on Sep 16, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It should not jeopardize it at all... i made significant changes to a site that was in the top 3 for a pretty big keyphrase, and it only helped... ended up #1 several times over the span...

most common steps i take are obviously image optimization "save for web" in photoshop i use about 65-75% JPG and 128 colors for GIF.

call javascripts from external files, eliminate additional code from the page.

combine your CSS files if you are calling more than one one the page.

just some of my tips in case you need em, but you sound like you got a grasp on it.

baici41

5:37 am on Sep 17, 2008 (gmt 0)



html resizer can help you

[edited by: engine at 8:21 am (utc) on Sep. 17, 2008]
[edit reason] no urls [/edit]

rocknbil

4:31 pm on Sep 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This question is colored by . . . a lot of things. On the one hand, everyone touts the 10K home page rule, but in practice, they ignore it completely and bog the page down. To be safe, yeah, optimize. Overall, you want to get it as small as you can, wherever that is.

For graphic images, first pursue the .gif or .png option. Many graphics can survive a severe color reduction - using tonyoriega's example, most nav buttons don't lose any info when set for 8 or 16 colors. This can reduce the file size by as much as 90%. You have to be careful with reducing a .jpg that much.

I generally convert to indexed color and start with 8 colors. If that kills the image, I try 16. Then 32. Then 64 . . . if you have to use 128 or 256 colors on a .gif..png, it's time to compare: save a version at that color depth, then save one as .jpg with various quality settings. See which file is smaller and choose the winner.

tonynoriega

7:25 pm on Sep 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i have seen posts that say to use a certain file format for this or for that...

i have found thats not always true.... sometimes i can get a .jpg smaller in file size than a .gif with better quality, and vice versa...

so as rocknbil said, do some testing and save some space...

maybe use some CSS divs or classes to place some images?

although im not sure if that will make a difference in page size?

londrum

7:49 pm on Sep 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



you could always wrap a bit of php around your page, which strips out all your comments, new lines, tabs and whitespace. that way you can leave it in an easy-to-read format for yourself, but still deliver a crunched-up version to the user.

something like this...

<?php

function html_strip_whitespace($htmlpage) {

 $replace = array(

 "#/\*.*?\*/#s" => "",

 "#\s\s+#" => " ",

 "> <" => "><",

 "\r\n" => "",

 "\r" => "",

 "\n" => "",

 "\t" => "",

 );

 $search = array_keys($replace);

 $htmlpage = str_replace($search, $replace, $htmlpage);

 return trim($htmlpage);

}

ob_start('html_strip_whitespace'); ?>

// all the code for your page goes here

<?php ob_end_flush(); ?>

thecoalman

10:04 pm on Sep 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



G-zip :) pbpbb3 spits out about a 65kb style sheet, thats reduced to about 15KB I think using gzip. Same with HTML files. Even pages with a lot of text in are quite small. Usually about 8KB.

As far as the images I take a different approach. You need to select according to the content. If for example you had a web page with really large chunks of the same color and took a screenshot of it hands down the .gif will be significantly smaller even at 256 colors. the other benefit is the text is perfectly preserved. A lot of people have the impression they are only good for small images like icons but that is not the only place they are useful.

I don't even mess with .gif where photo type images are concerned.

kaled

1:57 pm on Sep 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use 256 color .png images for screenshots.

Use .jpg for photos. Use a noise filter and possibly a minimal blurr filter (e.g. a Gaussian blurr with 1/2 pixel radius).

For small images, only experimentation will determine the best format (.gif isn't often the smallest but it can happen).

I have one page that's over 150k and I'm wondering how important it is that I do something to make it smaller.
If that's all text, I'd look hard at reducing it, but if it is mostly linked images, then size doesn't doesn't matter (to Google anyway).

Kaled.

FourDegreez

4:30 am on Sep 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Personally, I wouldn't make any big changes to a page that is ranked first in Google. Seems like an unnecessary risk to me. But if it's images causing a problem, then definitely optimize those.

myrrh

1:39 am on Oct 8, 2008 (gmt 0)

10+ Year Member



If that's all text, I'd look hard at reducing it, but if it is mostly linked images, then size doesn't matter (to Google anyway)

What is meant by "linked images?"

kaled

10:29 am on Oct 8, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A linked image is merely an <img src="image.jpg"> tag.

When calculating page size, some people include the size of images. Since you did not specify, contributors to this discussion had to make a guess. Since few pages consist of 150 KB of text (i.e. the html file is itself 150KB) it was a reasonable guess.

Kaled.

myrrh

12:18 am on Oct 9, 2008 (gmt 0)

10+ Year Member



(I apologize for making the contributors to this thread guess - had I known it was critical information, I would have included it - there are actually very few images on the page in question and those images rather small)

So, are you saying that linked images are not counted in the page file size?

And, what other way is there of displaying images in a browser?

kaled

11:14 am on Oct 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Search engines are only interested in the text not the images. (Images may also be indexed but that's something else altogether.)

Total load time of a page will depend upon text and images - a page that is too slow loading may loose visitors even before it has finished. However, if the majority of your visitors use broadband, even 150KB is probably ok.

If the images are small, it is possible to embed them but this is not supported by Internet Explorer and even if it was supported, there are few circumstances in which it would be advantageous.

One area you could look at is the markup. If it is an old page with lots of <font> tags, etc., the chances are that it could be reduced in size significantly by using CSS (but it could be a big job).

Kaled.