

HTML Comments Are Diamonds (Javascript) - AltIvan
http://javascriptisawesome.blogspot.com/2011/07/comments-are-diamonds.html

======
sixtofour
For the hard of understanding (like me), why is this particularly worthwhile?

~~~
AltIvan
Its excellent for in-place-non-active-at-the-start content; specially useful
for images.

For example: Lets pretend you are really interested in having as few requests
to the server as possible. And lets pretend you have a huge multi-content
gallery (images, flash, video, etc).

So, you want a nice javascript pagination for all that; but if you just hide
the pages it is gonna get loaded on the user browser, and the page is gonna
get really slow.

But, if the content is inside comments the user machine only loads it when the
user actually ask for it. It feels ajax-like but a little bit faster and with
less petitions to the server.

Here is a script that does a little bit of that <http://jsbin.com/ihepuz/2>

~~~
sixtofour
Oh, oh, oh, oh, oh! Inside _html_ comments. Exactly like the article says!

For some reason, when I read it the first time, my brain would not allow me to
see "comment" as anything but the kind of comment that a visitor would write
on a blog.

Although I must say your explanation was much more clear than the article.

Thanks so very much. :)

------
xiaomai
Gross background.

~~~
AltIvan
Sorry, i love it... but someday i am gonna put the option to hide it.

