Categories
Computing Web Development

How browsers detect whether the URL points to a file or a directory

Suppose you are a browser and you get a URL like:
https://www.enavigo.com/awesome
How do you know if awesome is a directory or a file?
A really nice hint you’d be nice to give is to append a slash to the URL whenever you denote a directory.

So how *can* you find that out?
The only way I found out had to do with headers. It appears that when web servers are sent a URL like https://www.enavigo.com/awesome and awesome *is* a directory, the response header will redirect the browser (or requestor for that matter) to the properly specified URL
https://www.enavigo.com/awesome/ which has the trailing slash character. I am sure that has to do with server setup.

Need to research this issue more…

Share
Categories
Web Development

What browsers do when we ../ too much

Part of my thesis work touches on the way web browsers behave and how they process the code that the almighty developers throw at them. Most browsers do not scoff at crappy code, they do try to make sense of it and try to put lipstick on a pig. While testing my code on my own family website, I noticed an interesting behavior: the PHP header file I was including in all pages, had a reference to an image

<img src="../images/imageName.jpg" />
Share
Categories
Java Television Web Development WebSphere

Deploying a web application to Jetty

The Jetty web application server is great. It is just not very well document and when it is documented it is aimed for the very uninitiated. If you’re using Jetty, it is almost like an old boys club – ‘you made it’.

Still, it appears that Jetty and Tomcat are becoming much more similar in their way of doing things, with both using a somewhat proprietary, if you can say that on an open source project, configuration schemes. So how do you deploy a web application to Jetty?

Share
Share