Platform detection (Mac/Windows/Linux)…

Hi everybody,

is there a way to have specific image assets per platform? I would like to have the Finder Icon on my website when browsing from a mac and the file explorer icon when browsing from windows.

Same with a download page: When on windows I would like to get them the Windows executable und when on Mac direct them to the Mac page.

How to deal with those issues in blocs?



This is not something I’ve had to do myself, but it may require platform.js like this in the header <script src="platform.js"></script>. I have no idea though how this would link to showing specific images depending on the platform with Blocs.

There is a stack for Rapidweaver called Agent I have used in the past that would do this and much more, but I cannot remember what script it is using. Agent was great in theory, but seemed to break in practice when I tried it with Cloudflare using particular page rules or a LiteSpeed server.

There are several forum members, who are far cleverer than me and may be able to offer some better information, however this is not something you can do automatically in Blocs.