html - Difference between adding <![CDATA[ in page source v/s dynamically using javascript -


is there difference between --

<![cdata[ // content of javascript goes here ]]> 
  1. adding part of html response server v/s
  2. adding dynamically after page load using javascript (lets $('body').append(/cdata_goes_here/))

main question here whether cdata needs available part of page source or not?

leaving aside general issues adding content using js, cdata doesn't make difference.

it renders in xhtml document , gets parsed comment in html document.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -