Portal Home > Knowledgebase > Articles Database > Is my Rollover code script outdated?
Is my Rollover code script outdated?
Posted by nWo Sting, 12-09-2007, 03:08 AM |
My web server suspended my account and would not tell me the specific reason. All they said was that I am using too much CPU and MEM on their shared server. They said I should upgrade to a dedicated server. The problem is the amount it prices for one month on a dedicated plan is much more that it currently prices me to host my site for an entire year. I am still well within my max storage space and max bandwidth, but I have no idea how to tell my max CPU. However they did hint that I may be using bad script by saying
"If the issue persist, you may want to upgrade all third party scripts to the latest versions and remove any script that are no longer in use."
They are really not giving me any clues as to what set it off, but the only non basic script I currently use are include codes and rollover codes. They did reactivate me but I need to fix this or they will suspend me again. I am wondering if using a different rollover code would help. Here is part of my current rollover code, you will notice the copyright 1999....
Or you can also just go to a page on my site to view the code (unless they suspend me again):
http://www.realmofdarkness.net/pranks/celebpranks.htm
or
http://www.realmofdarkness.net/games/home.php
This is just the header, then there is more stuff that goes after the rollover images....
onMouseOver = "rollover('home')"
onMouseOut = "rollout('home')">
Would using a simple and shorter rollover code even matter with the whole CPU/MEM issue? I am currently with Lunarpages and have already found a better deal with Host Monster, but I don't want to transfer to them and just get suspended again. I want to hold off on upgrading to a much higher web hosting plan as long as possible. Thanks for all your help.
|
Posted by Renard Fin, 12-09-2007, 04:40 AM |
A rollover is clientside so it cannot be a clientscript that would use the CPU on your hosts's side. Mostly must be something that has to do with your php scripts maybe with the database access that would be too much ressource intensive.
|
Posted by foobic, 12-09-2007, 06:35 PM |
Agreed - it's not the rollovers. Using modern css rollovers would reduce the number of images loaded for the menu, which would help marginally, but other issues are most likely more important. Apart from your database structure and php scripts another thing that may be causing excessive resource usage is the huge number of requests for small images (130+ on the games page?).
Starting with the PHP / MySQL, do you have indexes set up correctly? Are you selecting more information that you actually need? How often are these pages updated? Could you use a static HTML cache?
Then to reduce the number of thumbnail images, could you split them into different pages? Or create them in blocks of 12 and use a client-side image map for the links?
|
Add to Favourites Print this Article
Also Read
Deasoft Down (Views: 843)