Hacker News new | ask | show | jobs
by admax88q 1801 days ago
Even with web apps, you can serve the same app from the same URI. URI doesn't imply static content.

Serving a slightly different web app from the same URI based upon other random metadata on the other hand. Makes caching all the more complicated.

1 comments

I get that. I do think by and large, the user's agent (the browser) should be making display and format decisions based on itself, rather than the server serving different content. Though I think the exception is mobile, where we probably shouldn't serve the client endless garbage it doesn't need.

I mostly think the replacement for user agent should be a boolean of mobile or not mobile. And everything else should be dynamically handled by the client.

Honestly though, if its enough content for mobile, its enough content for desktop as well.

The "garbage" we don't want to serve mobile, is often also garbage for desktop, autoplay videos, too many tracking scripts, etc. If we force people to optimize their site for mobile and desktop then maybe we'll actually get good desktop sites.

Eh, navigation layout should definitely be different for mobile, and we shouldn't ship the desktop navigation to phone browsers, and I still think it's reasonable to offer phones smaller/more compressed image sizes and stuff by default.

I agree tracking scripts and the like should be blocked and removed across the board. But I think there's probably a suitable amount of visible UI and content that should be shipped differently or less to phones, because of how they're interacted with.

I hear you, but I'd wager the size differences are actually pretty minor. Absolute worst case you have 2X the CSS and HTML but much will be redundant so it will probably compress well with gzip.