Chris1973
09-12-2000, 05:57 PM
Just wondering because i want to setup random banners on my site and to use it the pages must be shtml and i wonder if haveing this will make the CPU go up? This is the one i think i'll use http://www.shavenferret.com/scripts/ads/
i found others but thats the only one i could understand :)
Félix C.Courtemanche
09-12-2000, 06:34 PM
If you use .shtml web page, that will effectively raise the CPU usage a bit. However, what will raise it most is the cgi script that will display the banners, not the .shtml itself.
SSI (.shtml) is known to be slow, so only use it when necessary. If you can avoid it, you really should (for example, don't use .shtml when you have no SSI calls in the web page, since it forces the web server to parse the file even if it is empty)
Another example is using SSI to include files on the fly to generate "dynamic" content. that will effectively work, but is much slower than using PHP to do it for example.
Have fun!
MattF
09-12-2000, 07:13 PM
It will rise the server CPU only (fractional as well) as it is processed server-side, the client's CPU (i.e. the one with the web browser won't be affected) since it is simply rendering the html which is not dependent on the file extension. If you don't have to administrate or control the server then you've got nothing to worry about, until they haunt you for abusing their server, which they won't do unless you have X thousand of hits a minute of each page load takes 100% cpu usuage.
There is however one disadvantage to .shtml is that some early browser don't cache .shtml properly, they only cache .htm and .html which could prevent users from viewing your page offline or could cause the page to reload when pressing the back button, these aren't major problems and probably invisible to most users. Most modern browsers v4 onwards and very intelligent and cache anything well. You can easily change the extenstion by creating a file ".htaccess" in your root directory and adding the following:
AddHandler server-parsed .shtml .shtm .sht .html .htm
This will process all .html and .htm as server-side html (i.e. shtml) and will work exactly the same, however on the down side even if your .htm has not server-side directives it will still run it through the processor and hence take a extra fraction of a second to be served. You could get even cleverer by using your site intials as extensions just add them to the above (e.g. link .wht to php).
Check out this for more info:
http://www.eclipse.net/webmaster/htaccess.html
Hope this helps.
Chris1973
09-12-2000, 08:48 PM
I get around 50,000 page views or more a day so my virtual host would probly kick me off and im using some cgi now. And it would be used on ever page. What if i went with a remotely hosted random banners i've seen alot of people that have it but in return they run there on ads since its free so is there a remotely hosted one that i can pay to use so there ads wont be run on my site? I think it would be worth it if it got me higher CTR
I think using SSI is good. For me, I have headers and footers that change constantly. Changing one file is easier than changing 40 of them :)
The cpu on my box is under used anyway, might as well put it to use on something good other than SETI...
Félix C.Courtemanche
09-13-2000, 01:29 PM
Yes, teck... it does work, but it is slow compaired to other method of doing this...
For example, I programmed a template for our company web page, wich calls in the text to add everytime, and you wouldnt see the difference between it and a normal web page.
actually, the only difference is that it is always going through a file called main.php
SSI _will_ do the job fine, it is just a bit slower and require more cpu for the simple tasks it achieves.
If extreme speed or cpu usage is no problem... then SSI is fine.
Learner
09-13-2000, 03:20 PM
Originally posted by Chris1973
I get around 50,000 page views or more a day
Chris, it would be nice to post your URL here. Many of us out here may like to see your site.... especially because of your impressive number of page views.
Thanks.
Learner
akashik
09-13-2000, 05:29 PM
[i]the only difference is that it is always going through a file called main.php
[/B]
I was filling out an init.php files a few days ago, following the readme file as I went when I came across an odd thing (to me). Seems I have to provide the script with the user/pass to my domain for it to run. This is all fine and good if it gets it to run, but is there a problem with someone being able to get hold of that file and reading through it?
Just a concern...
Greg Moore
http://www.akashik.net