Hi,

I was looking for a quick answer on this as i have been wondering what is the advantage of using javascript files in an includes folder rather than on page?

So for example i have a javascript validation on my page, does it make a difference to the way it is execute compared to if i referenced to it rather than having the full file in my page?

thanks

From what I've read, it's considered a best practice. One plus is that more than one web page can include the same script. Also if the script is called from different web pages and it's already in memory it doesn't have to be reloaded. I've been reading about it in Sams Teach Yourself JavaScript in 24 Hours

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.