News for hackers. Stuff that matters.
Re:Are We Taking CSS Too Far? by sp332 on Wednesday August 18, 2010 @05:23PM (#1615651)
If you want to minimize HTTP requests, or store everything in one document, couldn't you embed a GIF or PNG in the HTML using MIME? I just checked, and a PNG of the "profile" icon is about half the size of the CSS. (261 bytes vs. 560).
Re:Are We Taking CSS Too Far? by jessor on Wednesday August 18, 2010 @05:40PM (#1615700)
Re:Are We Taking CSS Too Far? by sp332 on Thursday August 19, 2010 @03:50PM (#1618382)
If you want to see it, put this in your address bar:

  data:image/png;base64,
  iVBORw0KGgoAAAANSUhEUgAAAAoAAAAOCAYAAAAWo42rAAAAAXNSR0IArs4
  c6QAAAL9JREFUKM%2BNkE2KhDAUhMvMUoQQyCK6yE30Jp5C5LmbC%2Bkm5E
  Au9BDZ1Cy604Md%2BqegoEg%2B3ksFvCulRBGh957ee4oIU0r5mshBRAjg4
  mVZStA5V4DOuQeocFdVVXiWUuo%2F5zCOYwFezp7LWGtprS3KVCSJL%2FRY
  va4r%2Br6HMQbGGAzDgG3brqunaSoaZ8%2FzfPueEMJLKDvGyJ%2FjOH73f
  X%2F7vvM8gbquP05smoZKa%2F2xsdYaCCGwbduX07quY4yRf337vKb8xjnB
  AAAAAElFTkSuQmCC
After base-64 encoding and including whitespace, it's still only 408 chars for the PNG.
Re:Are We Taking CSS Too Far? by MichaelApproved on Wednesday August 18, 2010 @07:12PM (#1615922)
The problem with that method is it'll make the initial page load really slowly.

Often multiple http requests are avoided because browsers only make a limited amount of requests to a server at the same time. The best way to fight this is with image sprites and css source files stored on another server. I believe a simple sub domain would be enough to trigger more requests at the same time. Something like files.domain.com that even points to the same site as www.domain.com should do the trick. Load your site from www. And css/images from file. Subdomain.

Re:Are We Taking CSS Too Far? by robin_reala on Thursday August 19, 2010 @03:52AM (#1616773)
No, he’s talking about data URLs. They work in everything barring IE6+7.