Skip to main content
Copy edited.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

What is the point of sending HTML, which is in a form that you don't want, to the client browser and making it run JavascriptJavaScript code to clean it up?

  This looks like a bad design.

How about fixing all your static HTML, and HTML generation, so that these superfluous <br> elements do not occur in the first place?

If you use JavascriptJavaScript to modify the document object, do so for dynamic effects that cannot be achieved in any other way.

What is the point of sending HTML, which is in a form that you don't want, to the client browser and making it run Javascript code to clean it up?

  This looks like a bad design.

How about fixing all your static HTML, and HTML generation, so that these superfluous <br> elements do not occur in the first place?

If you use Javascript to modify the document object, do so for dynamic effects that cannot be achieved in any other way.

What is the point of sending HTML, which is in a form that you don't want, to the client browser and making it run JavaScript code to clean it up? This looks like a bad design.

How about fixing all your static HTML, and HTML generation, so that these superfluous <br> elements do not occur in the first place?

If you use JavaScript to modify the document object, do so for dynamic effects that cannot be achieved in any other way.

Source Link
Kaz
  • 59.1k
  • 10
  • 113
  • 167

What is the point of sending HTML, which is in a form that you don't want, to the client browser and making it run Javascript code to clean it up?

This looks like a bad design.

How about fixing all your static HTML, and HTML generation, so that these superfluous <br> elements do not occur in the first place?

If you use Javascript to modify the document object, do so for dynamic effects that cannot be achieved in any other way.