How to use jQuery or HTML5 to duplicate header and footer on all pages? -
i know rails , django can use templates write header , footer once separate file, , include in of webpages. wondering, can can achieved jquery or html5? if so, how?
<html> <head></head> <body> <navigation> include code header.html here </navigation> ... page specific content ... <footer>include code footer.html here</footer> </body> </html>
ya, if use jquery's .load()
function. think like
$('footer').load('/assets/myfooter.html');
and should it.
the thing can't html domain because of 'same origin policy', believe prevent csrf attacks and/or session hijacking.
Comments
Post a Comment