Archive for April 13th, 2005

More on output caching

I´ve wrote a bit before about PHP and SQL output caching but it was based around caching it within the server/network of the host. This is good thing for the project I was considering it for since it was necessary for the pages that change regularly.
 
There are, however, caching servers (such as Squid) that take copies of pages to save bandwidth and server load. These servers are generally set up to ignore .php pages since they are generally dynamic by nature, which is a good thing.
 
It did occure to me that I could reduce server load on some sites that don´t change that often by getting these servers to cache the sites. All I would need to do is send the content type header as html instead of php and the servers should keep a copy. It could be done through the server configuration or something like
header(´Content-type text/html´);

should do it. Only thinking out load really, might give it a try and see what happens.

Creating your own DHTML drop down menu…

…. is in a word, the biggest waste of time since Stevie Wonder´s visit to a mime feastival. I was trying most of yesterday to create a drop down menu in a combination of Javascript and CSS for Island Leisure and after much messing around with a free menu I came accross, gave up.
 
The menu in question works fine but when I tried to insert it into the page I wanted (nothing fancy, just a table or two and a bit of CSS) it all went horribly wrong. I finally got it working in IE6 and thought that all was well, but then I loaded up Firefox and the positioning was all wrong.
 
Sod it. I decided to stop messing around and use the Milonic DHTML menu. I´ve used it before on a non-profit project and had no problems at all. I figured paying the ?20 ish was a lot better than me spending hours going through code trying to get it working.

 
Lesson learned