James Ellis wrote:

Hi

The portability of URI's is an important point here: as discussed, if a web developer wants to move from X to Y server side language yet retain the URL stucture then this is the way to go, in Apache it's just a simple matter of telling it how to handle certain extension-less files.
That said, you should be able to set up a server to handle PHP scripts with .cfm extensions via the PHP interpreter and vice versa (as an example).


I wrote an article over at the Sydney PHP Group on doing this with Apache, shared hosting or otherwise, questions welcome offlist or post to that group.
http://sydney.ug.php.net/phpBB2/viewtopic.php?t=61


I agree, portability of URI's are important and an extension for an image is not doesn't necessarily qualify for an exclusion to this rule. I quite commonly render an image dynamically by setting the MIME type of a php file to the appropriate type and displaying the image I require. But I believe this is beyond the point with this article in question; The article suggests removing file extensions in the html document, eg the file logo.gif would be written in the html as <img src="/images/logo" />. this has no relevance to portability of URI's because it is not a direct link. Doing that with a .html document may be relevant but definitely not images.

Apache has a module called mod_spell, it's not turned on by default but it helps when a site has been ported from an IIS server to apache. It solves the case sensitivity issue. The trouble is using the external modules can increase server load, a lot. Consider that you have 20 images included on a page all with their extensions removed, that means the server has to scan the specified directory for all those files rather than retrieving the specific files. That can cause a huge overload on the server, especially if there are a lot of requests at any one time.

Secondly the article also referred to removing comments from javascript as if they were unnecessary garbage, but doesn't this contradict everything we have learned about good, clean code? The purpose of comments is to remember what you did six months down the track when you need to do something to it. Removing comments will undoubtably clear a few bytes from a page download, but the result will be extremely mimimal.

*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************




Reply via email to