Just wondering why our computer gods who gave us the internet could not use the conventional slash in a URL? Instead, they had to give us the backslash, but was this really necessary?
WAG, so it would differentiate it from a DOS prompt.
(I’m not even sure why I’m answering this…we all know you’re not going to be back)
Thanks, Joey for the thought. Yes, the DOS sintax still lingers on in so many ways to hinder us. (Back when I can. I have a life, too, you know.)
URLs do not use a backslash. They use a regular forward slash. It is DOS paths that use a backslash.
Why DOS does that, I have no idea. The slash is a regular punctuation mark, but the backslash seems to be pretty much entirely confined to computing uses.
nm: ninja’ed
If it helps, Tim Berners-Lee regrets including the slashes and says that he could have designed URLs so that they didn’t need them.
It’s to differentiate DOS from Unix, which was first.
IIRC when they added directory/file structure to DOS they used a backslash because they had already used the forward slash as the switch marker.
They did use the conventional slash. They were using unix machines. Those silly dos machines with their slashes going the wrong way came later.
Browsers seem to be intelligent now to be able to properly interpret a URL entered with forward or back slash, so it’s no longer an issue.
A sintax is the money the government collects on wine, women, and song.
You’re thinking of syntax, which is when the women conjugate after wine and song.
So does my compiler.
What compiler uses URLs?
It doesn’t use URLs but DOS directories.
But they did it because of something that came earlier - the forward slash was popular as a “command line switch” in old mainframe environments, and they carried that through into the DOS utilities. When they needed directory syntax, that created conflicts.
An explanation from Larry Osterman:
http://blogs.msdn.com/b/larryosterman/archive/2005/06/24/432386.aspx
(If you ever had to deal with VMS file syntax, you could be no more than mildly annoyed by slashes that go the wrong way.)
It’s not the browser, it’s the web server. The http://boards.straightdope.com/ part (aka the domain) gets you to a specific machine. Everything after that (the path) is interpreted by the web server on that machine. The domain by definition is not case sensitive. The path may or may not be case sensitive and may or may not accept forward or back slashes, depending on the machine and its particular web server software. Generally speaking, though, web servers are getting more flexible with what they support.
If you ever had to deal with RSX-11 numbered directories VMS was an improvement.
“depending on the machine” is a good point. The natural thing for the web server designer to do is simply parse out the file path between the domain spec and the “?” if present, slap the local doc root on the front of it, feed it to the native filesystem API, and you get what you get. Doing that naively in early webservers created some interesting security holes, for instance, allowing use of “…” to gain access to the directories above the doc root.
The / character is slash. The \ character is backslash. Dos/Windows is the one who does it backwards.
The use of \ by Dos/Windows is incredibly stupid. When writing programs, the \ character is used to indicate that the next character is special in some way. For example, I may put "
" in the code to indicate a newline. Or " " to indicate a tab. The problem when writing code in Windows is that I have to backslash the backslash when I program paths into my code. For example, I have to do this:
path = “c:
ew\ est”
I have to backslash the backslash. If I just had “c:
ew est”, the compiler would turn the
into a newline and the into a tab.
Yeah. SImple answer:
Unix uses regular slashes, DOS used backslash.
The original web service mimic’ed FTP and UNIX filesystems used the directory structure path to documents; since that’s how it was put on the disk/filesystem before active content.
So basically, original browser was simply a file viewer that allowed you to put in the network name and filepath of whatever you wanted to open, not much different than a file reader like Notepad.
No surprise then that the syntax for file(page) selection is basically network/unix syntax.
The big leap of difference with http was adding the ability to code a section of that document so the browser would automatically follow that link whenit was selected.
Adding active content - inputs, programming etc. was the gravy that gave us what we have today.
making changes to that would require a big shift.
You can rewrite browsers so that they gues what you want without the punctuation; the “http://” has been optional for years.
Until you are sure 90% of the people have browsers that follow the new standard, you can’t really rewrite the requirements for specifying HTML links. SO it stays that way due to poularity and inertia.
(It gets worse with new devices like smart phones; Microsoft can Apple can push out updates easily, but a lot of smart phones and other simple devices probably never get updated- so we’re stuck with what they work with, unless websites want to piss off their customers and drive them away.
Anyone remember how much fun it was when frames first appeared? Or 128-bit security certificates?