javascript - Is it an acceptable idea that I write HTML codes into JS codes? -


every website has static codes constant. example header, footer, advertising box , ...!

well want write static html codes js file, , know catch. loading faster. mean why user should download fixed html codes time? think can catch them trick mentioned.

however don't have lot of experience in field. not faced problems later if that?

mixing view (html) , business logic (js) anti-pattern violates separation of concerns. said, depends on kind of code mixing within view: strictly related view's rendering?

if though motivation loading faster think doing wrong.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -