Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2020
    Posts
    378

    Remote Calling of Code in Web Page

    Hi

    I need advice from those who are smarter than I am.

    On several of my client's sites, I place the coding that is common to each of my pages as a txt file on the server. Then i call that file on each page. This allows me to place 1 line to call 20-30 or more lines of code. As long as the code remains the same on each page, this file gets cached and is called just once, helping with page speed.

    It works quite well.

    MY QUESTION: is there any consequence to calling the Google Analytics code from this one file? My thoughts are that Google will "see" which page is being displayed and not care that the script was called previously on a different page.

    Am I missing something, or will this help me to further speed pages?

  2. #2
    Registered User
    Join Date
    Nov 2019
    Posts
    2,528
    cURL is a great way to make remote requests, and the PHP ... Then we execute the request by calling curl_exec() . Finally, we free the resource to clear out memory. So, the boilerplate code for making a request looks something like ... cURL that I can think of is simply fetching the contents of a web page.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.