Hacker News new | ask | show | jobs
by WirelessGigabit 861 days ago
I'd also change it to `Referer`, as that is what Chrome seems to be using.

And referrer is set twice!

1 comments

Indeed, he spelled it the right way, which is the wrong way. He should spell it wrong, which is the right way. :)

I think it is funny that this misspelling hasn't been fixed after all of these years. It was typo'ed in the original http spec in 1996: https://en.wikipedia.org/wiki/HTTP_referer

If the web server is following RFC 8969, it will treat "referrer" as "referer" and throw a 397 TOLERATING to let you know you should change it to the latter on your end. See Section 3.

https://pastebin.com/TPj9RwuZ

(Yes it's my April Fool's RFC.)

Most things that care about that field accept both because so many programmers make that mistake.

But you're technically right, the best kind of right.

They make the mistake of spelling it correctly, lol. Silly programmers.
"I don't hire programmers who spell correctly, I hire programmers who misspell consistently!" or how does the old joke go.
JIMINY CHRISTMAS YOU STILL EXIST!!!!

(btw its absolutely lovely that you put hanging out with your kids in profile

((Gush much, who?? me!???)))

/need to close my lisp

There are regional variations in the use of doubled or single consontants:

UK: travelling, signalling

USA: traveling, signaling

The double l serves no purpose in these.

However, there is no such UK/USA split in "referring": both use double "r".

There is a phonetic reason for that which is that the second syllable has the emphasis in "refer", unlike "traveling" and "signaling" where the leading syllable has it.

The double "rr" indicates the stressed syllable, without which "refering" and "referer" could be misread with emphasis on the first syllable, like "buffering" or "suffering"/"sufferer".

A native speaker with good intuition for spelling would never write "refering" or "referrer", even if they find "signaling" acceptable.