Monday, March 06, 2006

Website Stuff

I've been studying the circle of protocols and languages useful for web pages: html, xhtml, css, ssi, perl, javascript, php. There is an outstanding site with tutorials on these things, at http://www.htmlite.com. I tried out the stuff on my sites at the Maths Department, and Logic Press.

Cascading style sheets allow you to alter the entire look of a whole site by editing one file. One issue is that the gurus deprecate the use of colour names such as green, magenta, etc, and so you end up learning about RGB descriptions of colours. This has been a bit of an adventure. I keep trying things, and being surprised by the result. For instance, equal red, green and blue, such as #ffffff (that's three 255's in hexadecimal) gives white, as you would expect, but if you drop the red just a little bit, say to #f0ffff, then you get a very pale and dreamy green.

Now there's a funny thing. The blog editor that comes with this site allows me to wysiwig in the html code for the above colour, which I pick from a pallette of 80 colours. It also allows me to edit the html, and change the colour to #f0ffff, but if I do, then the text vanishes in the previewer! Maybe if I go ahead and publish it, your browser or mine will display it; why not? Maybe the previewer is set up to recognise only colours from that pallette. Let's try. The end of this sentence is written in a pale and dreamy green, but if it ends at the comma, then I'm wrong.

Do you see the text after the comma, in very pale green? Aha! It's there, by gum, but I now see that my page has a very pale pink background, and the pale and dreamy green has become an almost invisible slightly yellower shade, and you don't see it at first. It's a special case of a general problem: it's really easy to make stuff invisible on a web page.

Another issue is what it takes to get a server-side include included by the server. I find inconsistent behaviour between different servers. The server running at Maths
handles something like (I had a bit of ssi code here, but it got excluded when I saved it! Blog-editor-side-exclude, I guess.) by sticking the contents of test.shtml into the current file before sending it out to the browser. But the server running at Host Ireland won't seem to do this unless I rename the current file so that its extension is .shtml instead of .html. What is this? Once I have a page up, and people have found it and bookmarked it, I don't want to change its name, nor do I want to go around installing redirects all over the place. Apart from anything else, people get nervous when you redirect them these days: they are afraid you are sending them to a russian mobsite that will hijack their computer and use it to sell porn.

This is not good, because the gurus want us to use server-side includes instead of frames to put stuff such as navigation bars and, well, frames on and around our pages. It seems that frames don't work too well if you are displaying the page on some exotic device, and people are using more and more exotic devices these days.

No comments: