Jump to content

Archived

This topic is now archived and is closed to further replies.

_jack

Ghost Textbox Code Cleanup

Recommended Posts

_jack

Hello all,

 

Just launched a site and its super slow so trying to clean it up.  One thing I have found is a bit of unnecessary javascript in the footer in an invisible text box.  It is not showing up in the editor and I have looked in every file to see how i can delete this but with no luck.  

The code is: 

 

// <![CDATA[
  (function() {
    var th = document.createElement('script'); th.type = 'text/javascript'; th.defer = true;
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(th, s);
  })();
// ]]>
 
 
Any ideas?
 
The site is currently running through CloudFlare hence the rocketscript.
 
Other suggestions on how to make this run faster would be appreciated!
 
Thanks,
 
Jack 

Share this post


Link to post
Share on other sites
James B

Hi Jack 

 

Have you tried clearing the cache file inside the w3 total cache plugin first? That's also showing as active on the site.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
_jack

Hi James,

 

Yes, i've cleared the cache in both w3 and cloudflare.  The textbox code is still there in the footer...  Does pagelines create this text in a file or database somewhere that I can modify/delete directly?  Thanks for your help!

Share this post


Link to post
Share on other sites
Simon

You added it to the footer, so you need to open the dms editor and look in the footer for the textbox.

 

It will probably be collapsed if the textbox has no output so it might be hard to find.

Share this post


Link to post
Share on other sites
Simon

BTW disk based database caching is the best way to slow your site down, my advice stay well clear of that.

 

database/query/opcode caching is NOT supposed to be done by php using files.

Share this post


Link to post
Share on other sites
_jack

Hi Simon,  thanks for the tip on caching.  The textbox is definitely not visible in the footer when in the dms editor... I deleted the watermark and simplenav to see if it was hiding behind.  Is there another way of getting to the footer content?

Share this post


Link to post
Share on other sites
Simon

Impossible for us to say, we can only see a cached page.

Share this post


Link to post
Share on other sites
_jack

I purged both caches before and after checking - cloudflare is also paused.  DMS editor says there isnt a text box in the footer, the source says there is...  What I would like to know is where the content of this particular textbox is stored within the pagelines/wordpress structure so that I can try remove it in an alternative way.  Is that doable?

Share this post


Link to post
Share on other sites
Simon

I dont know what you purged but all i see is a cached page from 3 hours ago.

 

We do beg users to clear caches and disable any cache plugins before posting support queries to save time ;)

Share this post


Link to post
Share on other sites

  • Similar Content

    • yasinyaqoobi
      By yasinyaqoobi
      In the footer of my website, I can't find where Leasing is located. I have to remove it.
       
      http://grandavenueshops.com/
       
       
    • IDdigital
      By IDdigital+
      Hi,
      A site of ours irregularly does not finish loading. The page in question is https://rw360.org/grievance-process/
      In Safari, I'll occasionally get the following error:
      [Error] TypeError: undefined is not an object (evaluating 'a.plModel.init')
          (anonymous function) (site.js:5:91)
          i (jquery.js:2:27455)
          add (jquery.js:2:27750)
          ready (jquery.js:2:29819)
          (anonymous function) (site.js:5)
          Global Code (site.js:5:3421)
      This seems to be a bug in PageLines as far as I can tell. Any suggestions or a fix coming?
      Thanks,
    • Paul
      By Paul+
      I was surprised to see I had no menu today - out of the blue - its actually moved to the bottom of the page!  After hours of fiddling and disabling every single plugin, leaving just plagelines the issue is still present.  See video for a basic text box - I moved it into the head and it jumps to the bottom and shows just above the footer but below the main content.  I have a temp fix by placing the menu into the first row on the main content but it does mean other than my home page, all other pages have no menu.  A quick fix is very urgent for this bug.
      https://thelaptopfixers.com
       
       
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I am using a plugin called Speed Booster Pack to speed up the load time of michaelkummer.com. One of the plugin settings, Minimize HTML and JavaScript causes an error that I only get with Pagelines. With other themes, such as WordPress' Twenty Seventeen, I do not get that error.
      I have reproduced the problem on my staging site and if you look at the JavaScript console, you will see the following error:
      SyntaxError: Unexpected end of script
      Any clue what PageLines may be doing differently to be contributing to this issue? I contacted the plugin developer and they, of course, pointed me to the theme developer
      Thanks
      Michael
    • flourishdesignstudio
      By flourishdesignstudio+
      Hello,
      We are working on a site and the customers are complaining that the site loads too slowly. They contacted their host who mentioned that the Java Script is all loading at the beginning. Is it possible to delay the load of the less important Java Script until after the initial load to speed up the site? The goal is to load the page faster by minimizing the initial javascript calls.
      Are there any preferred plugins that you would recommend or does this end up causing excessive problems with plugins, etc.?
      Thanks for the help!
×