Forum Moderators: coopster

Message Too Old, No Replies

Any Cons when using Include and Require

         

Gian04

2:51 pm on Jul 21, 2007 (gmt 0)

10+ Year Member



Will it make my page loading slower since it has to access and retrieved the contents of a separate file unlike placing all the codes to a single page,?

StudioKraft

5:04 pm on Jul 21, 2007 (gmt 0)

10+ Year Member



On a technical level, yes, it does add "processing" time when the server has to include files.

However, the best part is that the increase in processing time (unless you need to include hundreds of thousands of files for some weird reason) is not noticeable to any human who is looking at the web site, and the benefit to the developer of being able to reuse code far outweighs the microseconds of delay caused by having to include files.

Save yourself development time by using include statements and don't worry about any increase in page load times unless your web site is running off of a tape drive. ;)