I am just (obviously) pretty new to web development but I have got a decent computer track record including some college-level lisenced users.
To make my website as speedy to maintain and updateable as you can I’m trying to utilize CSS to control as much as possible, and I’m likewise experimenting with applying server side includes to stop duplicating code.
Specifically I’m implementing PHP’s include() function in adding a header. web coding which contains this navigation menu.
Here’s where my question is supplied in. I realized that we could conceivably put all the normal opening HTML CODE junk (the doctype announcement, the html, scalp, title, meta, link to stylesheet, and opening shape tags) into my own included header file and have my page be an include statement on the top, the content with the page in the particular file, and a footer include at the end to take care on the /body and /html and also anything else at the end.
Stylistically, is there nearly anything wrong with that is definitely it poor web development practice Is there an occasion I could come across problems later Or is that this better since I’m making the exact content more modular compared with having all the actual opening and closing stuff in each file and sticking the includes following opening body and prior to closing body tags
I’m endeavoring to figure this out there before I proceed nuts and create fifty pages regarding stuff that I’d must update if MY SPOUSE AND I realize I have to do it one way or the other.
Thanks for that help. Sorry internet promotion so long-winded.
I take a step along those ranges, and whether it truly is pretty or unpleasant, it works.
One thing you should think about is definitely performance: if you do have a large website or a massive multiplayer website, all the extra file reading it does will translate proper performance hit. Of course, if you simply a small site, that won’t matter. If you have a large web-site, it will always be significant.
I wouldn’t get too wary of that…
The includes will probably be handled by the particular server… no reasons why reading three small text files have to take especially more time than reading just one larger text archive.
Having a modular pattern will reap benefits further down the line.
Sean
Which means you think including the standard webpage formatting/framing with an included header/footer could well be better than trying to keep it in each one file and only keeping repeated portions of the actual body inside included files.