Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Google shows a way to make smaller html files
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Evgeny  
View profile  
 More options Jun 26, 3:19 am
From: Evgeny <evgeny.zis...@gmail.com>
Date: Fri, 26 Jun 2009 00:19:42 -0700 (PDT)
Local: Fri, Jun 26 2009 3:19 am
Subject: Google shows a way to make smaller html files
http://code.google.com/speed/articles/optimizing-html.html

Essentially, not all tags "require" a closing tag when using the HTML
dtd (not XHTML) - does HAML have a mode where he ignores these closing
tags, and thus makes the file size smaller?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan Weizenbaum  
View profile  
 More options Jun 26, 3:22 am
From: Nathan Weizenbaum <nex...@gmail.com>
Date: Fri, 26 Jun 2009 00:22:57 -0700
Local: Fri, Jun 26 2009 3:22 am
Subject: Re: [haml] Google shows a way to make smaller html files

Haml does indeed omit the closing tags of self-closing tags such as "br" and
"meta" in HTML mode.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evgeny  
View profile  
 More options Jun 26, 3:34 am
From: Evgeny <evgeny.zis...@gmail.com>
Date: Fri, 26 Jun 2009 00:34:17 -0700 (PDT)
Local: Fri, Jun 26 2009 3:34 am
Subject: Re: Google shows a way to make smaller html files
So can we expand that list to include the other tags mentioned in that
google article?
Some of them are not just "self-closing" tags like <br> and <meta>,
but rather tags with content - like <p> and <li>

On Jun 26, 10:22 am, Nathan Weizenbaum <nex...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan Weizenbaum  
View profile  
 More options Jun 27, 1:25 am
From: Nathan Weizenbaum <nex...@gmail.com>
Date: Fri, 26 Jun 2009 22:25:59 -0700
Local: Sat, Jun 27 2009 1:25 am
Subject: Re: [haml] Re: Google shows a way to make smaller html files

No - I don't think Haml will ever do any optimizations that will actually
change the rendering of a document. Consider for example

#foo
  %p bar
  baz

If we removed </p>, this would render as

<div id="foo">
  <p>bar
  baz
</div>

which is equivalent to

<div id="foo">
  <p>bar
  baz</p>
</div>

and *not* equivalent to

<div id="foo">
  <p>bar</p>
  baz
</div>

Unless you can come up with a way of removing the tags that is guaranteed
never to produce this sort of change, it's not safe to include it.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mislav Marohnić  
View profile  
 More options Jun 27, 10:05 am
From: Mislav Marohnić <mislav.maroh...@gmail.com>
Date: Sat, 27 Jun 2009 16:05:42 +0200
Local: Sat, Jun 27 2009 10:05 am
Subject: Re: [haml] Re: Google shows a way to make smaller html files

Here's a proof of concept (monkeypatch):http://gist.github.com/137005

*Keep in mind this is still vulnerable to the issue Nathan explains:
*

On Sat, Jun 27, 2009 at 07:25, Nathan Weizenbaum <nex...@gmail.com> wrote:
> Unless you can come up with a way of removing the tags that is guaranteed
> never to produce this sort of change, it's not safe to include it.

Nathan is right. You have to implement the logic on top of my monkeypatch to
*keep* closing tags if the following content is inline tags or text nodes
but should not be nested under the tag in question.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google