Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Snitz 'SpeedBall 2'
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 19

waynemr
Starting Member

USA
19 Posts

Posted - 11 August 2003 :  17:35:04  Show Profile
for reference, if anyone would like some CSS coding reference, please see http://www.devguru.com/Technologies/css/quickref/css_intro.html
Go to Top of Page

waynemr
Starting Member

USA
19 Posts

Posted - 11 August 2003 :  17:39:40  Show Profile
Actually, it wouldn't add much back into the bandwidth, since you basically take the style code and place it in the <head></head> section. It would do an extra database call I guess, plus the extra packaging in vbscript to make the ASP spit out the result.

It could also be done via FSObjects... but anyone with a hosted site would be out of luck.

==============================
Snitz n00b but not for long!
==============================
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 11 August 2003 :  18:17:24  Show Profile  Visit D3mon's Homepage
The benefit of having the CSS in an external file is that it can be cached by the readers browser. In this case, it is not necessary to send the whole style sheet for every page view. This represents quite a saving in bandwidth.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

shawdzee
New Member

USA
67 Posts

Posted - 21 August 2003 :  14:45:49  Show Profile
D3mon,

Thanks again for the setup.asp update. I installed it using MySQL and all seems great.

A few questions for you;

The bottom line for doing this is to increase the response time!

Using LB_CSS snitz with MySQL, I noticed about 10 tables are opened, and kept open! Who controls this process? Is there a way to drop the connection after the user leaves?

The reason I’m asking is that we are planning to have several forums installed on one server. Not all of these forums will have continuous usage. However, if even one person uses each forum, then the connections to tables are opened AND kept open!

Does anyone know how to close these connections to MySQL?

Thanks,

be well, shawdzee
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 21 August 2003 :  14:58:16  Show Profile  Visit D3mon's Homepage
This mod only reduces the data passed between the host and web client. Any increases in response time could be considered a side-effect of the process.

DB connection strategies is a whole other area. I'm pretty sure it got a whole lot better with the last major release of Snitz though (3.4xx).

My personal suggestion for improving this is to get all the data from the DB, store it to arrays, close the connection and build the page. This method minimises the DB connection time.
But that would be a whole other MOD....


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

ssnapier
Junior Member

USA
126 Posts

Posted - 01 September 2003 :  20:54:57  Show Profile  Visit ssnapier's Homepage  Send ssnapier an AOL message  Send ssnapier an ICQ Message  Send ssnapier a Yahoo! Message
does this open connection problem happen in Access too??? I have no clue how to fix it, but it would explain a few things!


If freedom were shareware, soldiers are the ones who pay for it.
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 01 September 2003 :  21:46:24  Show Profile  Visit Gremlin's Homepage
Access and MySQL handle connections in a much different way ssnapier, so to answer your question no, it doesn't really apply to access as well.

However ... If your forum is a rather busy one and you have a lot of concurrent users then access may not be the best choice of database for you to use, you might want to consider upgrading to MySQL or MS SQL if your host allows it.

Kiwihosting.Net - The Forum Hosting Specialists

Edited by - Gremlin on 01 September 2003 21:48:14
Go to Top of Page

ErEf
New Member

Netherlands
74 Posts

Posted - 02 September 2003 :  10:03:04  Show Profile  Visit ErEf's Homepage
the difference is about 25k per page !! but... missing naturally a lot of mods.

If you think you can or you think you cannot, you are right. - Henry Ford
Go to Top of Page

ErEf
New Member

Netherlands
74 Posts

Posted - 02 September 2003 :  10:10:42  Show Profile  Visit ErEf's Homepage
on search.asp there is still the combobox for members, if you wanna search for something on a member you'll probably know his/her name allready.
and.. if you still want to use that combobox you can also select postcount from the membertable and then show only the members who have a postcount of more than 0. why showing members who haven't posted yet :D

If you think you can or you think you cannot, you are right. - Henry Ford
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 05 September 2003 :  06:37:07  Show Profile  Visit D3mon's Homepage
[Updated zip with latest security release]


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"

Edited by - D3mon on 05 September 2003 06:37:26
Go to Top of Page

PDM71
Starting Member

Australia
3 Posts

Posted - 14 September 2003 :  08:45:04  Show Profile  Visit PDM71's Homepage
quote:
Originally posted by pweighill

In inc_header.aps there is a chunk of Javascript code. Perhaps you could make this a separate file so the browsers can cache this data.



I thought that was one of the main bandwith problems with Active Server Pages - even if an image, .js, or .css file has already been downloaded, the server serves a new copy whenever the page script is called. It's only when the .asp page itself is cached, that it won't reload all these.

That may be one of the main reasons bandwith becomes an issue for the forum, because all the images are served fresh every page.

Cheers,
PDM
Go to Top of Page

86atc250r
Starting Member

9 Posts

Posted - 01 October 2003 :  17:04:41  Show Profile
The browser is in control of caching, not the server side scripting language. To the browser a .asp page is no different than a .htm page.

The problem with the snitz forum using bandwidth is all the font face, font size, align, bgcolor, etc. tags when looping thru the code. CSS will eliminate the need for these redundant tags and thus reduce bandwidth used to deliver content to the end user browser.

For instance the following code:

<tr>
  <td align="center" valign="bottom" bgcolor="#000000">
     <font face="Verdana, Arial, Helvetica" size="2" color="#000099"><strong><u>Hello 1</u></strong></font>
  </td>
  <td align="center" valign="bottom" bgcolor="#000000">
     <font face="Verdana, Arial, Helvetica" size="2" color="#000099"><strong><u>Hello 2</u></strong></font>
  </td>
</tr>


Can be replaced by the following:
<tr class=tableFormat>
<td>
Hello 1
</td>
<td>
Hello 2
</td>
</tr>


Now, multiply that by several times because of all the characters you've removed from each and every row of data in your page output and you've saved some serious bandwidth.

I recently converted one of my applications (a race results reporting system) to CSS. I was able to cut bandwidth by over 70% on average. Pages with large tables & heavy formatting before CSS, downloads could easily be in the neighborhood of 500k. After implementing CSS & removing unnecessary source formatting (tabs & spaces) those pages would typically be under 100k - a HUGE improvement for both me (because of webhosting requirments) and my users (download time & client memory utilization)

Edited by - 86atc250r on 01 October 2003 17:24:16
Go to Top of Page

PDM71
Starting Member

Australia
3 Posts

Posted - 02 October 2003 :  03:59:44  Show Profile  Visit PDM71's Homepage
quote:
Originally posted by 86atc250r

The browser is in control of caching, not the server side scripting language. To the browser a .asp page is no different than a .htm page.





That's not true, 86atc250r.

Set one of your .asp pages to cache and it will cache as will all the images and linked files that come with it. But for pages that you don't want to cache (like a forum that is constantly updated), it will load the page from the server every time. That's fine - except, the server serves a fresh copy of every file linked from your .asp page as well: .gif, .jpg, .js, .css, even if the server and browser indicate that the image or script file or stylesheet hasn't changed since last time it was downloaded and it's sitting in the browser cache.

Check your log files - your users are downloading all your images every page view, even if they are in their browser cache.

Reducing your code reduces bandwith sure. But, if you have 30-40k of .js, .css and image files linked to your page, they are being downloaded fresh with every page, not called from the local cache. Get rid of avatars - limit your images to the bare minimum, and reduce the size of as much as you can.

This is a known issue with .asp, I think. I'm just trying to find out if it has been fixed in later releases of .asp and IIS.
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 02 October 2003 :  06:38:50  Show Profile  Visit D3mon's Homepage
Interesting.
Whether this is the case or not, the LB MOD is still effective in reducing bandwidth usage, as many have reported.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

86atc250r
Starting Member

9 Posts

Posted - 02 October 2003 :  12:43:18  Show Profile
PDM71 - I'm not sure I agree with that as I've had to put "anti-cache" variables on the end of images to prevent browswer caching - i.e. <img src="image.gif?nocache=a_random_number"> -I've also been forced to "reload" upon many occasions to get fresh page content, especially when testing.

It's true that there are headers you can set to try to prevent browser caching, but the browser will cache whatever it wants in the end, depending on user settings & browser cache strategy..

The webserver does not "serve" or "push" images, linked JS, or linked CSS - it presents the browser with html code which points the browser to such files and allows the browser to choose whether or not to download fresh copies of the items or not.

What you are describing sounds more like a browser issue than a server side scripting issue. Again, with .asp pages, the server side code executes strictly on the server - the output is plain HTML to the browser and is treated as such.

With the dynamic nature of .asp pages, it may expose browser caching strategy weaknesses much more than plain, static html pages that don't change frequently.

On the css subject -
In a script that generates a lot of repeating html like a messageboard or a datafilled table of any sort - CSS can be used to eliminate a ton of redundant code. For instance, I use 533 bytes of CSS in one of my scripts that many times eliminates several hundred Kilobytes of downloaded html code for my end users. There is a lot of value in that, no matter if the browser caches the 533 bytes of linked CSS or reloads it.


Edited by - 86atc250r on 02 October 2003 12:44:08
Go to Top of Page
Page: of 19 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07