How The Guardian successfully moved its domain to theguardian.com
theguardian.com
theguardian.com
> the Identity team started laying cookies on www.theguardian.com in advance. This was a nice touch because it meant that visitors would still be logged into the site when we eventually changed domain.
Everything else? Yeah uhm, not very interesting. As they wrote themselves, there's a thing called 301 - permanently moved.
Management wanted a "big splash" public rollout. Development teams wanted to avoid a "big bang" development effort. They solved this by going live many months ahead of time but ONLY for clients using special headers. This allowed anyone to test the system while still not making it "public" until the day of the big reveal.
I had not previously heard of that particular technique (using special HTTP headers) and it's a useful one.
I am pretty sure by "special HTTP headers", they mean cookies.
I've seen it done like that before, using a browser extension to add a header and then mod_rewrite to apply a special set of rules if that exists.
(Cookies wouldn't work anyway... how would you place them? What about expiration? How would they interact with existing cookies? What if you have to clear your cookies while debugging? Whereas a custom header requires a browser plugin, but otherwise is innocuous.)
Yes, the technical details are not too complex. But the risk is massive and the legwork still considerable.
If you work for a very large website and want to change domain you will have been following The Guardian's move closely.
I suppose one way of doing it is with some kind of script that links up to a prehosted theguardian.com so the cookie is set from where the js is included from.
This is just what third party cookies are. Cookies set from the server-side (ie, the Set-Cookie header) can set whatever domain they want -- and if that cookie happens to not match the domain of the page you're on, that's what's called a third party cookie.
Some browsers (primarily Safari IIRC), however, will automatically reject those cookies, either in all instances or depending on if you've interacted with that domain before.
What do you think?
[1] http://en.wikipedia.org/wiki/HTTP_cookie#Domain_and_Path
[2] http://en.wikipedia.org/wiki/HTTP_cookie#Third-party_cookie
My point was that it doesn't need to require much complexity at all; just an HTTP request served by the domain in question that passes along the cookies that need to be served from the new domain.
back here in reality, moving sites that generate many millions of dollars is always a big deal, and when it goes correctly, acknowledgement is due.
Reworded: "Google don't have a phone".
http://getluky.net/2010/12/14/301-redirects-cannot-be-undon/ http://mark.koli.ch/set-cache-control-and-expires-headers-on...
(note to confused and/or non-UK people: look up the magazine Private Eye)
On the other hand, newspapers based in London would send their typo-ridden newspapers to far-off locales first, and the corrected editions would stay in London.
Since the tastemakers were in London this resulted in a situation where the newspaper becomes notorious for being ridden with errors.
No idea if there's any truth to it, the wikip page presents a different story that sounds like problems with collaboration tools (eg. TTY) used between the two cities.
Great!
So is the consensus that .mobi was one of the worst ideas in existence?
http://www.webpagetest.org/result/140218_ZP_PHQ/
also many requests on the page
wat?
I'm intrigued as to why changing to relative domains wasn't possible. If nothing else pushing 'http://www.theguardian.com' out for every link adds to a lot of bytes up for a busy site.
pushing 'http://www.theguardian.com' out for every link
adds to a lot of bytes up for a busy site
Fewer than you'd think after gzip compression: $ curl -s http://www.theguardian.com/us | wc -c
223195
$ curl -s http://www.theguardian.com/us | \
sed s'~http://www.theguardian.com~~' | wc -c
215473
$ curl -s http://www.theguardian.com/us | \
gzip | wc -c
33783
$ curl -s http://www.theguardian.com/us | \
sed s'~http://www.theguardian.com~~' | gzip | wc -c
33554
They have 7.7k of extra html due to repeating "http://www.theguardian.com" for every link, but gzip compressed this is only a difference of 229 bytes.