partials - Is it bad practice to put elements below the </body></html> tags? -
sure following looks stupid:
<!--partialpage.html--> <html> <head>a css file linked here...</head> <body> first piece of content </body> </html> blah after html
...and fixed moving blah after html
body. turns out browser you, , appends end of body. (not reason stupid thing)
i did find reason why want simplify partial layouts in template engines.
<!--page1.html--> {{> partialpage}} <!--this partial/include--> content later teleported body. <!--page2.html--> {{> partialpage}} <!--this partial/include--> page using layout
this of course simpler doing of following:
//sendpartials.js { partialone: 'content later teleported body', partialtwo: 'another page using layout' } <!--page1.html--> <html> <head>a css file linked here...</head> <body> first piece of content {{> partialone}} </body> </html> <!--page2.html--> <html> <head>a css file linked here...</head> <body> first piece of content {{> partialtwo}} </body> </html>
so questions comes down to... method should using?
is bad create partial layout file?
just because browser let away doesn't mean should take advantage of it. potential caveats:
- this might not work in every browser.
- this might work in every browser now, not in 6 months.
- this might work in every browser, subtle differences might not catch.
- this might make browser turn on quirks mode or similar mode. don't want pages rendering in quirks mode, because can cause lots of random , minor things work subtly differently. working on unrelated feature 6 months down line, , have issue browser isn't doing you'd expect, solely because it's running in quirks mode.
i'd putting credit card through paper shredder -- sure, might job done, it's not practice rely upon.
Comments
Post a Comment