New MeFi Static Domain June 12, 2009 9:45 AM   Subscribe

We set up a new domain for hosting static content like scripts and images at mefi.us. You might want to add it to your NoScript whitelist.

If you don't run the Firefox extension NoScript, you won't need to do anything at all.

This is one of several changes we're making in the background to improve the speed of the site. By moving static bits of the site to a non *.metafilter.com domain we can shave a few KBs of cookies flying around for elements of the page that don't require cookies. And by consolidating all of our previous static subdomains into a single domain, we can reduce the number of DNS requests/page. Everyone wins! (Unless you're running NoScript and actually have to do something in response to this change.)
posted by pb (staff) to MetaFilter-Related at 9:45 AM (61 comments total)

I'll start panicking immediately....
posted by Confess, Fletch at 9:54 AM on June 12, 2009


Am I going to be tested on this?
posted by rakish_yet_centered at 10:00 AM on June 12, 2009 [1 favorite]


Reduction of cookies sans bias
Is a sign of programming quite pious.
A brand new domain!
So much more to gain!
You can find pix and scripts at mefi.us.
posted by googly at 10:03 AM on June 12, 2009 [9 favorites]


I can't wait for the new faster metafilter!

Wait, was it slow before? I can't really tell on my 300 baud modem.
posted by cjorgensen at 10:04 AM on June 12, 2009


My eyes glazed over when it started getting technical, but then pb said "Everyone wins!" so my response is "Yay!"
posted by amyms at 10:07 AM on June 12, 2009


Meh. I did it as soon as the favourites button and the YouTube player stopped working.

Can I forbid googleapis.com now?
posted by PeterMcDermott at 10:09 AM on June 12, 2009


Just a quick question since I'm curious: what were your previously static subdomains?

Also, maybe you could add the following for the next little while or so:

checkfornoscript.js (hosted on mefi.us):
var noscriptoff=true;

Then, at the bottom of the page:
<script src="http://mefi.us/checkfornoscript.js"></script>
<script>
if (typeof noscriptoff=='undefined' || !noscriptoff) {
var n=document.createElement('div');
n.appendChild(document.createTextNode('Looks like you might have mefi.us blocked using NoScript. mefi.us is a new domain for serving scripts on MetaFilter. Please allow it to get full functionality.');
document.getElementById('ajaxcontentarea').insertBefore(n,document.getElementById('ajaxcontentarea').firstChild);
}
</script>


Not everyone goes the MetaTalk, but some people will suddenly not be able to do everything they once did on MetaFilter, and won't know why.
posted by Deathalicious at 10:09 AM on June 12, 2009


It's just a blue page. I don't get it.
posted by iamkimiam at 10:11 AM on June 12, 2009


It's just a blue page. I don't get it.

If you don't get it, you don't have to get it.
posted by Deathalicious at 10:14 AM on June 12, 2009


what were your previously static subdomains

We were using images.metafilter.com, scripts.metafilter.com, and styles.metafilter.com. Chances are good that *.metafilter.com was enabled in NoScript so you didn't need to know about these domains. The issue was that every request for an image, script, or stylesheet carried the burden of all *.metafilter.com cookies. By switching to a new domain, the requests are cookie-free and milliseconds faster.

That's a good point Deathalicious, but I'm guessing there's a strong overlap between people who customize their browsers with script-blocking extensions on MeTa readers. I don't have any numbers on the NoScript install base for registered MeFi members, but I'm guessing it's fairly small. And NoScript itself should let folks know it's blocking a particular domain on the page. (I'm guessing on this—but I'll go test it out right now.)
posted by pb (staff) at 10:16 AM on June 12, 2009


Between this and the digital/analog TV switcheroo in the U.S. today, this is all just a little too much for me. I'm gonna take up knitting.
posted by marxchivist at 10:17 AM on June 12, 2009


Thanks for tossing the cookies pb.

Hey, can you put an image gallery on there for everyone to link to so we can bring back a limited edition IMG tag?
posted by BrotherCaine at 10:20 AM on June 12, 2009 [5 favorites]


But I want to get it. I like learning.
posted by iamkimiam at 10:21 AM on June 12, 2009


Yeah, NoScript is already in-your-face about the scripts it's blocking. I think that bright yellow bar at the bottom of the page is a good notification.
posted by pb (staff) at 10:27 AM on June 12, 2009


I hate that bar and turn it off, so thanks for the heads up.
posted by ODiV at 10:29 AM on June 12, 2009


By the way, here are the things that won't work if you have mefi.us blocked:
  • j/k keyboard navigation for posts/comments
  • b/i/link HTML buttons for posting/commenting
  • the 'add tags' and 'add photos' (MeTa meetups only) links inside threads
  • the inline youtube player
Favorites, flagging, and any other JavaScript-powered bits should work as expected even with the new domain blocked.
posted by pb (staff) at 10:36 AM on June 12, 2009 [1 favorite]


But I want to get it. I like learning.

I'll take a shot at explaining this.

Cookies are just small amounts of data that get sent to your browser when you load particular web pages. Your browser keeps track of these, and includes a copy of them whenever you make any further requests of that web site. Handy for keeping track of stuff like who you are on the site.

So the conversation between your browser and the site might go something like this:
Browser: Hi www.metafilter.com, can I have the root page.

www.metafilter.com server: Sure, here's your page, and here are a bunch of cookies for metafilter.com for you to remember.

Browser: (Notices there are images on the page that are on www.metafilter.com). Hi www.metafilter.com, can I have the first image please? And here's a copy of all the cookies you sent me for metafilter.com.

www.metafilter.com server: Here's image #1.

Browser: Hi www.metafilter.com, can I have the second image please? And here's a copy of all the cookies you sent me for metafilter.com.

www.metafilter.com server: Here's image #2.

... and so on. Notice with every request from your browser to www.metafilter.com, all the cookies you have associated with metafilter.com are sent along with your request. And they're not needed by the server just to retrieve an image or a script that never changes.

So now this "stuff that never changes" has been moved to a separate site in another domain, mefi.us. Now the same conversation goes more like this.
Browser: Hi www.metafilter.com, can I have the root page.

www.metafilter.com server: Sure, here's your page, and here are a bunch of cookies for metafilter.com for you to remember.

Browser: (Notices there are images on the page, that are on mefi.us). Hi mefi.us, can I have the first image please? [Note lack of cookies for metafilter.com here, because this request goes to mefi.us instead]

mefi.us server: Here's image #1.

Browser: Hi mefi.us, can I have the second image please?

mefi.us server: Here's image #2.
In the glorious new way of doing things, your browser isn't wasting time and bandwidth sending a copy of all the metafilter.com cookies to the server when it's just going to ignore them anyway. Stuff that does still need these cookies will still come from www.metafilter.com, so it'll get them.
posted by FishBike at 10:41 AM on June 12, 2009 [22 favorites]


If you're looking for ways to cut the size down, how about the inline CSS at the top of every page? And the inline styles that are on individual tags must waste k's on long threads.

(Although really the inline favoriting is the biggest waster, and I don't know how to make that smaller.)
posted by smackfu at 10:44 AM on June 12, 2009


Yeah, there is a lot more we could do in the CSS department. The inline CSS at the top is dynamic based on user preferences, so that's a tough one to put on a static domain, but we could be much, much better about removing unused style definitions, minimizing inline styles, and combining external stylesheets. Optimization is a never-ending process.
posted by pb (staff) at 10:50 AM on June 12, 2009


smackfu: "If you're looking for ways to cut the size down, how about the inline CSS at the top of every page?"

I think a lot of that is actually the per-user font specifications. But yeah, even that could be saved with a "/css/user_prefs_USERID.cfm" that generates CSS as output and does the Right Thing with if-modified-since headers.
posted by Plutor at 10:53 AM on June 12, 2009 [1 favorite]


Ah, I did not realize that was the font size stuff, and I do bump the size up so it makes sense I would have that. Does it get included for people with the default too?
posted by smackfu at 10:59 AM on June 12, 2009


Does it get included for people with the default too?

Yes. *Hangs head in shame.*
posted by pb (staff) at 11:03 AM on June 12, 2009 [1 favorite]


Fishbike, I say this with all seriousness: you could get rich writing stuff like that for tech-challenged people like me who would love to understand more of what goes on when I go on the interwebs. More please.
posted by CunningLinguist at 11:07 AM on June 12, 2009 [2 favorites]


nerd thread
posted by desjardins at 11:09 AM on June 12, 2009


Yeah! Thanks! That was perfect.
posted by iamkimiam at 11:10 AM on June 12, 2009


I'm kind of disappointed that when I went to mefi.us, it didn't say, "nothing to see here, please move along" or "this space intentionally left blank".
posted by pombe at 11:15 AM on June 12, 2009


Ram the gigabytes! Ram everything!

^From a very old commercial for some tech product I know longer remember, but that line always pops into my head when people start talking jargon.
posted by backseatpilot at 11:24 AM on June 12, 2009


Metafilter:It's just a blue page. I don't get it.
posted by JimmyJames at 11:30 AM on June 12, 2009


I like the thought of a dedicated place just for cookies, but I could see people being rickrolled over there during intense conversations where they feel that others need to take time out and calmly stare at a serene blue wall. Maybe we should put something motivational up. Like numbers counting down from 10. Or a picture of the mods hugging. A plate of beans perhaps. Or a quote, "This will be here tomorrow." "Go to bed." "Use your words."

Nothing is good too.
posted by iamkimiam at 11:30 AM on June 12, 2009


Another big savings would be a professional white background. No need to send all those RGB values for each pixel.
posted by DU at 11:30 AM on June 12, 2009 [1 favorite]


USA! USA!
posted by cowbellemoo at 11:33 AM on June 12, 2009


The .US actually stands for "USability".

or USurper

USury?

It's something like that. I can't remember.
posted by mr_crash_davis mark II: Jazz Odyssey at 11:43 AM on June 12, 2009


Another big savings would be a professional white background. No need to send all those RGB values for each pixel.

Plus it would save several Kb of text every day because there would be no more "professional white background" jokes.
posted by sleevener at 11:45 AM on June 12, 2009 [2 favorites]


DU: "Another big savings would be a professional white background. No need to send all those RGB values for each pixel."

I've been running the plain white theme so long now that it took me a minute to remember that mefi has colored pages.
posted by octothorpe at 11:54 AM on June 12, 2009


Cookies. Now I'm hungry.

Me: Hi www.metafilter.com, can I have some cookies please.
posted by rtha at 12:37 PM on June 12, 2009 [2 favorites]


I'm enjoying a double chocolate cookie right now. Will this affect my enjoyment of the site?
posted by blue_beetle at 12:37 PM on June 12, 2009


Reduction of cookies sans bias
Is a sign of programming quite pious.
A brand new domain!
So much more to gain!
You can find pix and scripts at mefi.us.
googly

I am in favor of anything that inspires limericks, particularly limericks that establish unusual pronunciations of things. Whee!
posted by ocherdraco at 12:39 PM on June 12, 2009


Bah, I got all excited, thinking this was going to be some kind of user-uploaded content hosting, like MeFi Music for images and scripts. Bah.
posted by lekvar at 12:55 PM on June 12, 2009


mefi.us just offered my browser the choice of a blue pill or a red pill.
posted by brain_drain at 1:31 PM on June 12, 2009


I've been running the plain white theme so long now that it took me a minute to remember that mefi has colored pages.

Dude, "colored" is not the preferred nomenclature. Chromatic-American, please.
posted by kirkaracha at 1:34 PM on June 12, 2009 [1 favorite]

By the way, here are the things that won't work if you have mefi.us blocked: ...
  • b/i/link HTML buttons for posting/commenting
block this, too, thanks
posted by fantabulous timewaster at 1:41 PM on June 12, 2009


pb writes "Favorites, flagging, and any other JavaScript-powered bits should work as expected even with the new domain blocked."

Favourites break, it's how I noticed the new domain a couple days ago.
posted by Mitheral at 1:51 PM on June 12, 2009


Yeah. Glad it's all nicer on my cookies and resolving, but I, too, vainly held out hope for the return of a safe IMG tag.
posted by cavalier at 1:51 PM on June 12, 2009


Mithreal, not a big deal but try a test where you allow googleapis.com and metafilter.com but block mefi.us. You should still be able to favorite things. The favorites code makes Ajax calls and has to be hosted at whichever domain you're on due to JavaScript's Same origin policy.
posted by pb (staff) at 2:01 PM on June 12, 2009


So now can we bring back user page customization? You could host the userpages on mefi.us.
posted by delmoi at 2:19 PM on June 12, 2009


I tried to put my script about the doctor who could fly and his amazing pet monkey Jimmy on the site but it rejected me. It and CAA.
posted by Astro Zombie at 2:27 PM on June 12, 2009 [2 favorites]


Does this mean we get the img tag back? Of course, that would mean we'd have to host all our images on metafilter.us, but hey!
posted by ooga_booga at 2:42 PM on June 12, 2009


This is a very tiny thing, but the no mail icon for MeMail (http://mefi.us/images/mefi/icons/stockholm_mini/emailno.png) now has a white surround instead of being grey like the rest of the page?
posted by winna at 3:12 PM on June 12, 2009


hmm, I'm not seeing anything different about the icon winna. Mind grabbing a screenshot so I can see what's happening?
posted by pb (staff) at 3:30 PM on June 12, 2009


oh, I bet you're on IE6 and this is a PNG transparency issue. (Nevermind on the screenshot, we'll have to go back to a .gif.)
posted by pb (staff) at 3:35 PM on June 12, 2009


If you'll host the google code on mefi.us, I totally give you permission to stop supporting IE6. Everyone wins?
posted by Zed at 3:43 PM on June 12, 2009


I am at work, and have no control over our ancient browsers. I abase myself in shame, but it's gone now!
posted by winna at 4:12 PM on June 12, 2009


> j/k keyboard navigation for posts/comments

Holy shit, I didn't know this was even here. Sweet.
posted by cj_ at 4:40 PM on June 12, 2009 [1 favorite]


Sweet!

The filters at work block the main front page, MeTa, and Music, and all pages hosted on the main www.metafilter.com domain (profiles, recent activity, etc), but for some reason Ask, Projects, Jobs, and Podcasts are okay. Because all the style sheets and whatnot were hosted on the main domain, all these pages looked horribly broken and were a pain to navigate. Today AskMe randomly showed the proper green colours with the proper links and the proper formatting. I was so excited that maybe the main page had been unblocked, but it was not to be.

But still, now I have AskMe in the proper green! Thanks!
posted by Phire at 4:41 PM on June 12, 2009


pb writes "Mithreal, not a big deal but try a test where you allow googleapis.com and metafilter.com but block mefi.us. You should still be able to favorite things."

It's working now, I must have caught it mid change or something.
posted by Mitheral at 5:07 PM on June 12, 2009


eh, I'm easy...

Usability! Usability!
posted by cowbellemoo at 7:01 PM on June 12, 2009


Step 1: FishBike writes Mefi for Dummies.
Step 2: Profit!!

No step 3 needed.
posted by IndigoRain at 7:45 PM on June 12, 2009


> j/k keyboard navigation for posts/comments

Yeah, I didn't know about this either. I wonder what other nifty shortcuts I've not noticed here.
posted by nat at 1:06 AM on June 13, 2009


Is this the thread where we tell pb he's awesome 'cause he's totally awesome and oft overlooked?
Well, it is now.
Thanks, pb! You're awesome! Without you, Metafilter would probably still look like this!
oh.
well, shit.
you're still awesome, pb.

posted by The Esteemed Doctor Bunsen Honeydew at 1:10 AM on June 13, 2009


nat: "I wonder what other nifty shortcuts I've not noticed here."

If you use the phrase 'hypersonic shawarma' in 100 different threads, you'll get admin access. That's not so much of a shortcut as a longcut, I guess.
posted by Plutor at 5:38 AM on June 13, 2009 [1 favorite]


Another big savings would be a professional white background. No need to send all those RGB values for each pixel.

I'm starting to think that his obituary, forty or fifty years from now, is going to contain a line, "He is best known for his controversial proposal of a 'professional white background' for the community blog Metafilter."
posted by jayder at 10:43 AM on June 13, 2009


« Older There's a reason we didn't give you that pony...   |   Update on memorial programs for slain Holocaust... Newer »

You are not logged in, either login or create an account to post comments