Help Desk
By Amit Asaravala, Executive Editor
A few months ago, the Web Techniques staff received a letter from a reader who suggested we set up a "quick tips" section where we could compile and answer Internet development questions in a monthly column. Although a "help desk" is not a new idea in the magazine world (or the Web world), we couldn't pass up the chance to learn about your most pressing development challenges and share creative solutions to them. To get started this month, I'll answer a few questions from folks within our own office. In the upcoming months, a guest Webmaster will answer your questions.
Slash Flash
Dear Help Desk,
I recently read a newsgroup posting that claimed I should be placing slashes at the ends of URLs that refer to directories on my Web site. Is it true that a link to webtechniques.com/about (no ending slash) will result in two requests to the Web server, whereas a link to webtechniques.com/about/ will create only one request?
Concerned Developer
Dear Concerned,
It's truewithout the ending slash, directory URLs can cause your server to get hit twice. To verify this, just take a look at your log file. I entered webtechniques.com/about into the address bar of my browser, and although I didn't notice anything odd from the browser side, the log file showed a first request for "about" that resulted in a 302 response from the server, and then a second request for "about/" that resulted in the usual 200 response.