Jump to content

Cleaner HTML Output


SKDown

Recommended Posts

I noticed that the html output when opening any page is very messy:

  • lots and lots of tabs and indenting
  • useless javascripts for guests (LOTS)
  • all css parts are loaded, even those not used at all


I highly request a nice mod/hook to clean those or even better ipb them selfs to start cleaning out their mess! it is a shame to see an unoptimized site.
regarding javascripts, it should be solved in every hook installed, why the status update for guests require javascript and ajax?

I hope this take some attention here. Let me know what you think!
Link to comment
Share on other sites


I noticed that the html output when opening any page is very messy:


  • lots and lots of tabs and indenting


I'm not part of the team that handles the HTML and coding, however I felt compelled to address this issue you brought up.

There are many benefits to tabbing and indenting, one of which is readability of the code. You could either deal with code that is all piled together and unreadable or code that is indented for various reasons. The indented code is much easier to read and in turn is much easier to go through and modify or even debug if necessary.

It's the same when writing source code for programs and scripts. Readability is an important factor and makes it much easier to deal with.

I hope that makes sense. :)
Link to comment
Share on other sites

hello,

thanks for the reply, i agree with what you said, but i don't think the attached file and the way of indenting have anything to do with it.

also, this applies to all skins. some javascripts are totally useless for guests!

Link to comment
Share on other sites

have you checked my attached file? is this how a code is organized?
i am not that much bothered, but from what i can read, i see javascripts for posting purposes loaded as well for guests. too much tabs where it isn't needed.

Link to comment
Share on other sites


have you checked my attached file? is this how a code is organized?


i am not that much bothered, but from what i can read, i see javascripts for posting purposes loaded as well for guests. too much tabs where it isn't needed.



The tabs used are exactly proper format - each nested item is a tab indent. IPS has a document that outlines their coding guidelines, and there are a few guidelines on proper indentation and nesting. These are for readability and basic understanding of the code.
Link to comment
Share on other sites

Re: the attachment

From what I have studied on the IPB source code, these kinds of white lines are hard to avoid because of how the templates are parsed. You have conditional statements in there that when false will only output the carriage return.

But this really doesn't affect performance one way or the other. This is a result of dynamic server side scripting that's inherit to HTML since the 'cgi' days.

I can live with this. What IPB should concentrate on is making the output validate. Other than that, I have no issues with how the HTML is output. Because I'm not looking at the source code. I'm looking at the end product and that should be error free.


hello,



thanks for the reply, i agree with what you said, but i don't think the attached file and the way of indenting have anything to do with it.



also, this applies to all skins. some javascripts are totally useless for guests!


Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...