Forum Moderators: buckworks

Message Too Old, No Replies

Source code in MIVA shopping cart template and bandwidth usage

Does a ton of whitespace use bandwidth?

         

Marcia

9:16 am on Jul 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't usually do the work on the MIVA cart, but in addition to checking the admin interface for page titles and categories that need changing, I was trying to figure out WHY this particular site uses so much bandwidth for the number of pageviews per month it gets.

Aside from graphics file sizes (too big), the MIVA shopping cart template has about 6 to 8 screens of white space to scroll down through in the source code, between section of actual HTML, which of course loads with every single cart pageview. That's in addition to a lot of other white space gaps in the template's code.

The HTML filesize alone is 55KB (should be no more than 20-30KB) - and the CSS file is 19KB (should be 6-8 KB).

Does a ton of white space in a shopping cart template cost "bandwidth" usage?

Added:
The site's static pages have about the same template, with even more on them, and the HTML file size for those is around 30KB, compared to 55KB for the comparable HTML of the cart template. The only difference is the amount of content (the cart actually has much less on pages) and those 6-8 screens of white space in the cart.

[edited by: Marcia at 9:23 am (utc) on July 2, 2008]

Jack_Hughes

11:44 am on Jul 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Untidy certainly but I doubt it will waste much in the way of bandwidth. On Windows each line is 2 bytes ie a /r /n characters. Using Linux & Mac just the one byte.

So a page full is only going to be about 50 bytes. Not the end of the world is it? If the site is serving up amazon levels of traffic then you might notice the difference if you got rid of the white space...otherwise you won't see any difference.

[edited by: Jack_Hughes at 11:45 am (utc) on July 3, 2008]

ZenArcher

7:16 pm on Jul 3, 2008 (gmt 0)

10+ Year Member



I've worked on some of those Miva sites--it's not a pretty picture. There are feature plug-ins that add "code slop" and are particularly hard to track down, especially if this is a v4 store.

If there are old non-functional plug-ins installed, you might try to disable them. If this is a non-compiled store, you may also have some access to the code.

If this is a v5 Miva store you should have access to all the main templating code.

The "white space" you point to is usually not just carriage returns, but also spaces and tabs, sometimes hundreds, hence the bloat.

Good luck!