I got stuck using both “referer” and “referrer” mixed together in variable names in my code.
referer and referrerOriginally, the English word meaning source reference is “referrer”, but in the case of HTTP referrer, it is sometimes intentionally spelled “referer”. This is due to historical circumstances where the header name was written with the wrong spelling when HTTP was formulated, and this is still used today. As mentioned above, the header name in the specification is “referer”, so especially in software programs that directly handle HTTP headers, if you spell it “referrer”, it may not even work as intended.
[Quote source]: HTTPリファラ - Wikipedia
Apparently the typo has remained due to historical circumstances.
Please give me a break…
That’s all from the Gemba.