Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Referer or Referrer
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Referer or Referrer

SplitIceSplitIce Member, Host Rep

To paraphrase Wikipedia

In HTTP, "Referer" (a misspelling of Referrer) is an optional HTTP header field that identifies the address of the previous web page visited by the client.

Given the spec spells it wrong, which do you think should be used in technical settings (i.e log files, documentation, etc)?

W3C members are human too!
  1. How do you prefer to refer to the htttp "referer"33 votes
    1. Referrer
      48.48%
    2. Referer
      51.52%

Comments

  • FAT32FAT32 Administrator, Deal Compiler Extraordinaire

    Personally, I use Referer if I am refering (pun intended) to the HTTP Header, and referrer everywhere else.

  • In technical docs, it should be as it is called.

    Thanked by 2HalfEatenPie devp
  • I don't know what htttp is.

    Thanked by 3SplitIce imok lentro
  • SplitIceSplitIce Member, Host Rep
    edited May 2022

    Please vote before reading but I very much agree with @FAT32 (also about puns)

    In regard to software however I do find it interesting that nginx error logs (but not ngx_http_referer_module) use referrer: "http://google.com". It certainly got me thinking perhaps my choice was wrong.

    Thanked by 1FAT32
  • ralfralf Member

    As per @FAT32's reply, use the correct spelling everywhere except the places that are mandated by spec to the wrong spelling.

    I remember suddenly realising once years ago, that I had written pages and pages of code passing around a variable definition and name "XColor colour" in various function definitions and I hadn't even consciously noticed the difference before then. XColor was just what the type was, colour was just my name. And this was years before IDEs wrote your code for you, this was all manually typed! So, it's definitely easy to get your head into this way of thinking.

    Another alternative, is just define a constants for all the headers you care about, and just use the correct spelling for the constant names everywhere. This is far better than having literals for the headers everywhere as sooner-or-later you'll mistype one and it'll just be silently ignored, and if you mistype the name of the constant you'll get an error when compiling / testing.

    Thanked by 1FAT32
  • ralfralf Member

    As a side note, I think this header would have been better named "Referenced-By:" in any case.

    Thanked by 1AlwaysSkint
  • yoursunnyyoursunny Member, IPv6 Advocate

    Our HTTP servers are highly intelligent.

    • We accept both Referer and Referrer.
    • We accept both Cookies and Biscuits.
    • We send both Set-Cookie and Set-Biscuit.
    Thanked by 2devp bulbasaur
  • jackbjackb Member, Host Rep
    edited May 2022

    @yoursunny said:
    Our HTTP servers are highly intelligent.

    • We accept both Referer and Referrer.
    • We accept both Cookies and Biscuits.
    • We send both Set-Cookie and Set-Biscuit.

    Careful, mcvities might sue you for tax purposes

    https://blog.yorksj.ac.uk/chrislawbore/2020/10/14/jaffa-cakes-not-such-a-piece-of-a-cake/#:~:text=In 1991 in United Biscuits,to the standard 17.5% rate.

  • It should be referer, IMO. As in refer-er; you wouldn't say, refer-rer. My keyboard dictionary likes both spellings, so alias that bitch and move on.

  • SplitIceSplitIce Member, Host Rep
    edited May 2022

    There has been some real swings in the voting.

    I did some thinking on it last night and I think I decided on referer for anything http. Simply to reduce defects. If there is only ONE spelling there is a right and a wrong way, if there is TWO then its potentially vauge as to which to use.

    In nearly all code we will be using http_referer or httpReferer (as appropriate) to make that clear. Tehnical documentation will use Referer for anything http related.

  • Bad enough having color & center.

  • MannDudeMannDude Host Rep, Veteran

    Reeferer.

  • devpdevp Member
    edited May 2022

    @SplitIce said:
    To paraphrase Wikipedia

    In HTTP, "Referer" (a misspelling of Referrer) is an optional HTTP header field that identifies the address of the previous web page visited by the client.

    Given the spec spells it wrong, which do you think should be used in technical settings (i.e log files, documentation, etc)?

    In IETF RFC documents the header field is referenced as "Referer".

    @dane_doherty said:
    I don't know what htttp is.

    In simple words http is RFC 2068.

    Further Readings:

Sign In or Register to comment.