With just one function quickly and easily increase your google page speed ranking.
As a web developer, you want to have a blazing fast website. When your visitors click on something, things happen almost instantaneously.
There are a lot of different complicated ways out there.
However, "include_once" function simplifies things for you.
var include_once = function(FileURL)
{
var get_file_type = FileURL.split('.').pop().toLowerCase();
if (get_file_type == 'js') {
var get_links = document.getElementsByTagName('script');
var arr = []
for (var i = 0; i < get_links.length; i++) {
var v1 = get_links[i];
var link = v1.src;
if (link == FileURL) {
arr.push(FileURL);
}
}
if (arr.length < 1) {
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.src = FileURL;
script.type = 'text/javascript';
head.appendChild(script);
}
}
if (get_file_type == 'css') {
var get_links = document.getElementsByTagName('link');
var arr = []
for (var i = 0; i < get_links.length; i++) {
var v1 = get_links[i];
var link = v1.href;
if (link == FileURL) {
arr.push(FileURL);
}
}
if (arr.length < 1) {
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('link');
script.href = FileURL;
script.rel = 'stylesheet';
head.appendChild(script)
}
}
}
You finish a project, get paid, and then it's back to finding the next client.
Month after month, the cycle repeats.
That's why many web developers never build real financial freedom—even though they're highly skilled.
The developers creating long-term wealth are using those same skills to build SaaS products, plugins, and digital tools that generate recurring income.
What if your next project could pay you more than once?
Learn How To Build Monthly Income →