Welcome to WebmasterWorld Guest from 34.201.121.213

Forum Moderators: open

Should I let this code be in my html file?

     
5:58 am on Jan 11, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Dec 19, 2004
posts:981
votes: 13


So I have a html page that has this code from Taboola ads which I don't use anymore:

====
<script type="text/javascript">
window._taboola = window._taboola || [];
_taboola.push({flush: true});
</script>
====

Would keeping this code do any harm to my page loading process? Please advise. Thanks!
6:41 am on Jan 11, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:9914
votes: 972


Won't affect the 25% of the web that surfs with scripts disabled.

Any third party added to your site will have some measurable difference ... only you can decide if it is worth it.

As for results, you have to try it to find out, something on the order of at least six months to generate enough metrics for real numbers.
6:42 am on Jan 11, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:9914
votes: 972


Oh, if you aren't using it, ordinary housekeeping suggests keep your code tight and to the point ... I'd remove it.
6:47 am on Jan 11, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Dec 19, 2004
posts:981
votes: 13


Yep thanks I removed the code!
10:23 am on Jan 11, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 25, 2005
posts:2091
votes: 370


Won't affect the 25% of the web that surfs with scripts disabled.

Did you forget to insert a decimal point there?
12:08 pm on Jan 11, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:9914
votes: 972


25.0% is a bit understated. (ad blockers count, too). In June Chrome will be there as well.
12:52 pm on Jan 11, 2019 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator mack is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:June 15, 2001
posts:7834
votes: 92


If you have code that serves no propose or is no longer in use it makes sense to remove it.

Mack.
1:20 pm on Jan 11, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 25, 2005
posts:2091
votes: 370


25.0% is a bit understated. (ad blockers count, too). In June Chrome will be there as well.

Ad blockers would make up the majority of that 25%, but they only block ad-related scripts (like Taboola), not all of them. Users that browse the web with Javascript disabled are a small minority. Chrome won't be blocking much either, only the worst stuff, certainly not all (ad) scripts.
1:37 pm on Jan 11, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts:2626
votes: 774


Would keeping this code do any harm to my page loading process?

It is nearly impossible for anyone to answer this specific question without knowing what the code does exactly and where it appears on your page. The script is most likely blocking, that is nothing else on the page can happen until it is executed. What gets executed is impossible for me to know. The higher on the page it appears the greater the impact on the user. My guess, is that this script serves to flush some sort of queue ahead of loading it up with new ads and article to show on the current page. The duration of the impact of the blocking is likely minimal. You can use the "performance" tab in Chrome to see the exact impact.

The other question to ask is what impact will removing the code have on the functioning of Taboola, my guess is that it will break something. Just speculating, it will likely show old ads or articles that will not be relevant to the page. The issue with this is that it may not be obvious or easy to diagnose if is occurring.
6:31 pm on Jan 11, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15705
votes: 813


Whether the script executes or not, anything that is on the page--as opposed to a separate .js file--will be loaded. Turning off scripts or using an ad blocker doesn't cause your browser to hold its breath, look away and refrain from downloading those extra bytes. Or kilobytes, depending on how verbose the code is. Why force users to expend bandwidth on something they're not going to use?
7:28 pm on Jan 11, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts:2626
votes: 774


@Lucy24 you may be right. The assumption is that if you are including scripts for advertisements such as Taboola you would like those advertisements to show correctly. It seems a little non-sensical to call a portion of the ad code and then not call the rest in order to speed up your page. Ditch it all or show it all.
12:32 am on Jan 12, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:9914
votes: 972


Housekeeping! :)

One client, this goes back a few years, wondered why his pages were loading so slowly. Took about 18 seconds to figure it out after looking at the source code: Inline css created by dumping MS Word docs as html, cut paste, and doing it over and over and over.... Whew! Talk about useless code!
3:34 am on Jan 12, 2019 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member tangor is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 29, 2005
posts:9914
votes: 972


Heh... and means nothing as to the OP's query. I get easily side tracked these days. Sorry!