Code With Mark
Home
About
Resources
Contact

How to easily increase your google page speed rank

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. 

What is include_once function? 

Here is the include_once function code:

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)
        }
    }
}

For Web Developers

Your Next Project Could Make You Money for Years

Most web developers get paid once for the work they do.

But what if you could use those same skills to build something that continues generating income long after it's launched?

A simple SaaS, plugin, web app, or digital product can keep bringing in customers and revenue month after month.

Instead of starting from zero with every new client project, you can create assets that work for you—even when you're not.

Learn How To Build Monthly Income →
Easily Get Query String Parameters with JavaScriptEasily Get Query String Parameters with JavaScript←Previous
how to easily create a basic web pagehow to easily create a basic web pageNext→

Related Posts

  • How Google Developers Think (And Why You Should Too)
  • Add Google Sign-In in 2 Minutes
  • Form Validation in 1 Line

Top Posts Viewed

Google Sheets Timesheet Website App Script
1.82K views
Learn To Create YouTube Video Downloader
1.33K views
Easily Edit HTML Table Rows Or Cells With jQuery
928 views

Categories

Courses
Excel
Google Script
Javascript
jQuery
Microsoft Access
MongoDB
Node JS
PHP
Quick Tip
Uncategorized
Wordpress