As per this question, websites can learn what operating system a client is running by examining the HTTP headers. There are some addons that prevent this from working. What is a legitimate use of this, aside from targeted marketing?

  • It could be used to serve the right website (css, js, fonts etc...). – HamZa Jan 26 '16 at 10:39
  • @HamZa could you explain what you are thinking? – Celeritas Jan 26 '16 at 11:12
  • 3
    For example, I would serve a different site to an Android device than a Windows or OS X device. This could even vary between the versions of the same OS, for example css-tricks.com/os-specific-fonts-css – HamZa Jan 26 '16 at 11:15

One obvious answer is when the website contains applications that you can download - it can then offer the content appropriate for your operating system. If I go to www.videolan.org with Javascript turned off, the download link goes to the Windows binary, but if I turn Javascript on, it goes to the appropriate binary for the system I'm actually using.

| improve this answer | |
  • wait just with js off they dont get Your OS anymore? I thought the OS is also included in the UserAgent... – My1 Jan 26 '16 at 9:19
  • 1
    Another reason is for device fingerprinting – Purefan Jan 26 '16 at 9:20
  • 1
    @Purefan well ya, that's what I mean a legitimate use. – Celeritas Jan 26 '16 at 11:13
  • 2
    @My1: UserAgent header is a tragic piece of history, and getting any sort of useful data out is a pain. Using JS is significantly simpler. – Piskvor left the building Jan 26 '16 at 12:37
  • but especially on mobile using UA is easier, becsause you dont even want to know how often I saw sites (especially forums and stuff) where I couldnt even use the js-powered submit button just because the js failed to load over mobile internet... – My1 Jan 26 '16 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.