7 ms·
I think that www vs. no-www, as a matter of "putting the customer first" is so INCREDIBLY insignificant, compared to the thousands of other decisions that go in
by forgotpasswd3x 11y ago
I think that www vs. no-www, as a matter of "putting the customer first" is so INCREDIBLY insignificant, compared to the thousands of other decisions that go into a product, that it's ridiculous we're even having this conversation. This is looking for optimization in the wrong places at its finest.
- x5n1 11y agoA redirect is also completely invisible to the user, and should only add a few microseconds to the page load. But you should always redirect www. if you are not using www. Many people instinctively type that into the address bar when you tell them a domain name.
- jjoonathan 11y agoA few microseconds, huh? I decided to do some experiments. Here's how long some 301s on common sites took: google.com: 529ms apple.com: 261ms microsoft.com: 142ms reddit.com: 61ms Which is not only 100,000 times longer than a few microseconds but more importantly well above the perception threshold.
- x5n1 11y agotouche.
- buzzdenver 11y agoWhere in the world are you that google.com's 301 takes over half a second ? It's under 100ms for me.
- jrockway 11y agoI don't get the parent's numbers either. I did: $ time (curl -L www.reddit.com > /dev/null 2>&1) real 0m0.410s user 0m0.040s sys 0m0.008s $ time (curl -L reddit.com > /dev/null 2>&1) real 0m0.389s user 0m0.036s sys 0m0.012s So for Reddit, I'm going to make the cost of the redirect 21 milliseconds.
- negus 11y agoyou're calculating load time the wrong way - you should not do time check outside the process as you do calling 'time' as another process from shell. consider using curl profiling option next time
- derFunk 11y agoWith `time` you also calculated the process time curl needs to evaluate the 30x response and the reissued http request to www.
- Nemo157 11y agoWhich is valid since this processing time will be included in whatever application the user is using to access the website.
- derFunk 11y agoI'm aware I'm nitpicking and maybe too theoretical now, but the processing time would vary in whatever application the user is using.. I'm with negus here who basically means the same I guess. The generic danger here (regarding benchmarking) is that you're explicitly also benchmarking curl. In case curl/"the web client" would handle 30x redirects super inefficiently, these results could lead to wrong assumptions.
- wangman 11y agoThis is because reddit.com and www.reddit.com gets you the http-versions, which both are redirected to https Try this: curl -sL https://{www.,}reddit.com https://{www.,}reddit.com -o\ /dev/null{,\ } -w "%{time_redirect}\n"
- buzzdenver 11y agoCan I ask you to explain that "-o\ /dev/null{,\ }" magic ?
- 11y ago
- elithrar 11y agoIn most cases it should stay low too: your browser should retain a keep-alive to the web server, so you're not throwing away the connection. Future requests will auto-resolve due to caching of the 301.
- manigandham 11y agoThere are plenty of places in the world where internet latency is a big issue, not to mention mobile networks everywhere. There's no reason to add a roundtrip unless absolutely necessary.
- lukeschlather 11y agoMediocre Wifi can easily add seconds of latency.
- jbverschoor 11y agoAnd this is EXACTLY why you should use www.
- otterley 11y agoHTTP/301 redirects are "permanent" per the RFC, and therefore cacheable. Subsequent requests for the apex zone by the user should cause the browser to skip the first request entirely.
- manigandham 11y agomicroseconds? That's definitely not the case. It takes 10s of milliseconds just to leave your internet router on busy wifi home networks. A 301 redirect is an extra network roundtrip for no gain and much more (perceived) latency.
- codeddesign 11y agothat is actually false. The majority of people no longer type in www. For example, in the last 10 years branding has completely remove the www and so likewise user reaction has followed suit. Unless you are targeting an older crowd, the vast majority ignore www on a search. With chrome being the major browser now and with browsers allowing search from the address bar, lookup without www is pretty much standard - again assuming your users are in a class of under 35 years of age.
- detaro 11y ago"many people" != "the majority". Having the site not work with www. would be very stupid.
- hackuser 11y agoOT: I'd be interested in what you have to say, but all subtlety and ideas are lost to hyperbole. All I understand is: This topic really bothers you.
- jwmoz 11y agoTroll.
- baby 11y agoI was going to write the exact same thing as you. But then I thought about Chrome removing "http://" http://" to avoid displaying useless and dense information to the user. What about www?
- LeoPanthera 11y agoThat would be misleading as example.com and www.example.com are not guaranteed to be the same site.
- codeddesign 11y agoTechnically I guess you could make it a subdomain but no one would actually do that in a production site and in my 14 years have never seen it used, not to mention that major search engine bots will lookup both. The general user will simply type in the domain name more times than not without the www
- jonhohle 11y ago`www` used to literally be a different host in a network (and in some cases, I'm sure still is) specifically designated for WWW traffic. Think of universities in the 90s which had their existing infrastructure and an Internet facing host on their primary domain and they want to add a web server. They may have had a firewall, probably no load balances, so routing port 80 around their primary host was much more complicated than just throwing up a new host and DNS entry.
- detaro 11y agoI regularly come across sites that only work with "www.". Common with university sites that use the subdomain hierarchy a lot. For extra fun, make the behavior reversed depending on if you are inside or outside their network.
- thesimon 11y agoMy uni makes this extra fun with different sites on http and https.
- brownbat 11y ago> www vs. no-www, as a matter of "putting the customer first" is so INCREDIBLY insignificant I don't know, I've always been fascinated by the premium of domains that are just one character shorter, and all of the startups that exclude a vowel to get a compressed (or maybe just available) name. That could reflect actual user preferences. UX theorists convinced me over the last decade that user behavior is shaped by tiny moments and irritations that we think are insignificant at first glance. A few 100 ms extra in delays may seem barely perceptible, but they can kill a site. It's not implausible that a few extra keystrokes could do the same.[0] On the other hand, redirects seem like a happy medium, so long as they're fast enough. nasa.gov uses a redirect, that seems fine. Note that they were driven to that (from 'www'-only) after confused fans kept writing in to complain that "http://nasa.gov" http://nasa.gov" was a dead end and that they didn't "even know the basics of running a website."[1] [0] https://www.nngroup.com/articles/response-times-3-important-limits/ https://www.nngroup.com/articles/response-times-3-important-... N.B.: In that link, Jakob Nielsen recommended making "www" optional through redirects. It's been a while, so not sure his current thoughts, but the same reasons would apply today. https://www.nngroup.com/articles/compound-domain-names/ https://www.nngroup.com/articles/compound-domain-names/ [1] https://blogs.nasa.gov/nasadotgov/2011/05/31/post_1306860816073/ https://blogs.nasa.gov/nasadotgov/2011/05/31/post_1306860816... NASA's case provides a real example of something Jakob Nielsen pointed out in the first link: usability is a slave to expectations. So if enough popular sites are using naked domains, and your naked domain just 404s, some users will dismiss your site as unreliable.
- lkrubner 11y agoDo you a think a user should have to write: http://www.apple.com:80/ http://www.apple.com:80/ or: http://www.apple.com/ http://www.apple.com/ Ever since the first web browsers, way back in the early 1990s, it has been commonplace to leave out the port number. The web browser adds it automatically. Similar logic would lead us to leave off the "http". And similar logic would lead us to leave off the "www". The trend has been to simplify the URL as much as possible.
- ldjb 11y agoNobody is suggesting the user should be forced to type in the protocol, the subdomain, or the port number. If the user types in: apple.com It should lead to where the user wants to go. However, there are good reasons for using the www subdomain as the canonical URL, and it is also worth noting that some users will habitually type in www anyway. If you don't want to include the subdomain in marketing material, then there's nothing stopping you from leaving it out, just as there's nothing stopping you from leaving out the protocol.
- geofft 11y agoFrom the article: Should I redirect no-www to www? Yes. Redirection ensures that visitors who type in your URL reach you regardless of which form they use, and also ensures that search engines index your canonical URLs properly. So I don't think you're advocating anything they don't.
- 11y ago