I use a Worker to implement HTTP/2 push for CSS assets. I have two CSS files: the normal one and another with the responsive queries. It would be awesome if I can detect the client’s screen size so that the Worker can push the appropriate CSS file.
Is it possible to do that with Workers?
By the way, I know that a Worker can inspect the user agent string. But that’s not a solution for me given that it’s error prone, can give false positives, and need regular updating and maintenance.