Jump to content

Archived

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

_jack

Ghost Textbox Code Cleanup

Recommended Posts

_jack+    0
_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    436
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+    0
_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    247
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    247
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+    0
_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    247
Simon

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

Share this post


Link to post
Share on other sites
_jack+    0
_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    247
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

    • JawDesigns
      By JawDesigns
      Hi everyone,
      Flywheel have reported errors on my clients site 'www.racewaredirect.co.uk' and it's not loading. Can someone please provide some information on how to fix this? The site has never experienced these issues before.
      Thanks,
      James Wilson
    • dreamsight
      By dreamsight+
      Hi, 
      I'm trying to make improvements to 2 of our sites PageSpeed scores using W3 and Autoptimize, specifically Eliminate render-blocking JavaScript and CSS in above-the-fold content using Autoptimize.
      Both sites are running on Pagelines (2.2.4) but I'm having trouble locating the aggregated CSS stylesheet which should be at the top of the site header, but on these particular sites the source code look much different (http://imgur.com/a/0kqbc - Actual site we are improving)
      Whereas most of the sites we have improved in the past (inclduing the example demo site of the plugin) the source code looks like this; http://imgur.com/LjRy5K7 (Tutorial Site Example of Source Code with Aggregated CSS link)
      I've turned off all the plugins on both sites and at this point I am 99.9% sure the source code formatting has been 'altered' by pagelines. 
      Does anybody know where/how i can locate the stylesheet I need?
      Thanks in advance.
    • Houston Haynes
      By Houston Haynes+
      OK - folks - back with another nit... The "back to top" link works - BUT - it's only active (i.e. clickable with the associated action following) when the mouse-over hovers over the footer area of the page. I did a quick change of the z-depth (to -1) and nothing made a difference. Any thoughts on how to make the *entire* back-to-top icon hover-able/actionable? Thanks!
       

    • romanondrasek
      By romanondrasek
      hi all, I have some trouble using PL5 on my site. 
      I used plugins for event calendar (event on) and plugin (timetable responsive scheduler for WP) for schedule (classes) in the gym.
      The problem is, that post from this 2 plugins are shown without menu in header and footer. (I setup header and footer) in the page editor for all type of page. 
      When I create a lesson, it creates posts with slug (I have a slug "lekce" & event for events).
      I try to edit the post with PL editor, but editor is not opening on the post.

      Do you have some idea where should be some problem? Thanx so much.
      here are links for the sites :
      site with schedule :
      http://www.myfit.cz/rozvrh/
      site of one of the class (pilates)
      http://www.myfit.cz/lekce/pilates/
      site with calendar :
      http://www.myfit.cz/kalendar/
      7 side with one event from the calendar :
      http://www.myfit.cz/event/pilates-instruktor-akreditovana-licence/?ri=1
      when I have my site on DMS2 it was working :-(
       
       
    • chamois_blanc
      By chamois_blanc+
      I am trying to clone a container on a page. It throws the following javascript error:
      function l(b, c, e, f) { var g = m.a.f.get(b, p); if (!c) { if (g) throw Error("You cannot apply bindings multiple times to the same element."); m.a.f.set(b, p, !0) } I would appreciate guidance and a fix. Thank you
×