473,386 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Why must Slashdot use // instead of http://?

Why must Slashdot use "//..." instead of "http://...":
<a href="//science.slashdot.org/article.pl?sid=06/06/05/1039204">Astronauts
Lost Tools in Space, Forced to Improvise</a>

I saved http://slashdot.org/index.pl?light=1&noboxes=1 to disk for
later local reading and various browsers interpreted the //
differently: ftp:, file:.

Jun 10 '06 #1
3 2267
Dan Jacobson:
Why must Slashdot use "//..." instead of "http://...":
<a href="//science.slashdot.org/article.pl?sid=06/06/05/1039204">Astronauts
Lost Tools in Space, Forced to Improvise</a>
Can't answer that, sorry. FWIW, RFC3986 does say that network-path
references, as they're known, are 'rarely used' (sec. 4.2).

(Of course, you could pick holes in that URL for other, arguably more
serious, reasons: (i) the .pl, and (ii) the necessity and the form of
the query part.)

ObHTML, :-) did you omit CITE from your example or wasn't it in the
original?
I saved http://slashdot.org/index.pl?light=1&noboxes=1 to disk for
later local reading and various browsers interpreted the //
differently: ftp:, file:.


to be expected, if the conditions for the first three ways of
establishing a base URL aren't met:

| If none of the conditions described above apply, then the base
| URI is defined by the context of the application. As this
| definition is necessarily application-dependent, failing to define
| a base URI by using one of the other methods may result in
| the same content being interpreted differently by different
| types of applications.
|
| A sender of a representation containing relative references is
| responsible for ensuring that a base URI for those references
| can be established. Aside from fragment-only references,
| relative references can only be used reliably in situations where
| the base URI is well defined.

(sec. 5.1.4)

--
Jock

Jun 11 '06 #2
begin quotation
from Dan Jacobson <ji*****@jidanni.org>
in message <87************@jidanni.org>
posted at 2006-06-10T20:11
Why must Slashdot use "//..." instead of "http://...":
<a href="//science.slashdot.org/article.pl?sid=06/06/05/1039204">Astronauts
Lost Tools in Space, Forced to Improvise</a>
Apparently some browsers, somewhere, let them "get away with it" due to
error recovery. This is why standards are made, and why it's in one's
best interest to follow them.
I saved http://slashdot.org/index.pl?light=1&noboxes=1 to disk for
later local reading and various browsers interpreted the //
differently: ftp:, file:.


It should be simple enough to fix this obviously broken document,
however, Slashdot should be made aware of the problem as well.

--
___ _ _____ |*|
/ __| |/ / _ \ |*| Shawn K. Quinn
\__ \ ' < (_) | |*| sk*****@speakeasy.net
|___/_|\_\__\_\ |*| Houston, TX, USA
Jun 11 '06 #3
Dan

Shawn K. Quinn wrote:
begin quotation
from Dan Jacobson <ji*****@jidanni.org>
in message <87************@jidanni.org>
posted at 2006-06-10T20:11
Why must Slashdot use "//..." instead of "http://...":
<a href="//science.slashdot.org/article.pl?sid=06/06/05/1039204">Astronauts
Lost Tools in Space, Forced to Improvise</a>


Apparently some browsers, somewhere, let them "get away with it" due to
error recovery. This is why standards are made, and why it's in one's
best interest to follow them.


It's not actually an "error", in its original context, though it's a
seldom-used URI form, and one which has no particularly good reason to
be used in this case (aside from saving a few bytes). What it means is
to access the hostname that follows the double slash, using the same
protocol as in the base URI of the document you are viewing. When that
document is accessed by http, then the link URIs would also be accessed
that way. This form of URI actually has its practical uses, in cases
where there are documents on different servers or domain names being
linked between where both the source and the destination documents
might be accessed via multiple protocols (e.g., both http and https, or
both http and ftp), and use the exact same path strings in both cases,
and you want the link to keep the user in the same protocol they were
in when they accessed the first document.

--
Dan

Jun 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: George Jempty | last post by:
In my journal anyway: "JSON: Javascript Unusable by the Client" http://slashdot.org/~scriptify/journal/103074
11
by: Mike Cox | last post by:
After writing an article trashing java, and C++, notable LISP guru Paul Graham is getting roasted on slashdot. Apart from AutoCAD and Emacs, what has LISP done anyway? Most real work is done in...
0
by: Joe Francia | last post by:
In case any of you missed it, there is a very favorable review of "Text Processing in Python" over on Slashdot: ...
1
by: bearophileHUGS | last post by:
There is a discussion about "Python Moving into the Enterprise" on Slashdot: http://it.slashdot.org/it/05/04/03/0715209.shtml?tid=156&tid=8 Bearophile
0
by: mscir | last post by:
Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <x46dnXQO6_TFqErfRVn-jw@pghconnect.com> Lines: 24 NNTP-Posting-Host: 67.136.138.220 X-Trace:...
1
by: asj | last post by:
Not that I particularly care anymore, especially given the very strong push by Java in open source circles (e.g. Apache's planned J2EE Geronimo app server and Red Hat's plan to create an open...
1
by: pemo | last post by:
Article here: http://it.slashdot.org/article.pl?sid=06/07/18/0146216 "When C was created, it was very fast because it was almost trivial to turn C code into equivalent machine code. But this...
3
by: Chung Leong | last post by:
In case you missed it: http://developers.slashdot.org/developers/06/07/28/0552240.shtml I have always wondered who sniper was. If you have reported PHP bugs before, chances are, you have been...
6
by: Christoph Zwerschke | last post by:
In Python programs, you will quite frequently find code like the following for removing a certain prefix from a string: if url.startswith('http://'): url = url Similarly for stripping...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.