Separate ad units for mobile/desktop. Do all units load on page load?

Sutra

Investor and Business Mentor
BuSo Pro
Joined
Oct 28, 2015
Messages
840
Likes
917
Degree
3
I'm looking for ways to decrease my page load time so would love your feedback on this.

I use an ad plugin for Wordpress called Ad Inserter. I have it set up so the ads units for desktop and mobile are separate. The desktop ads do not show up for mobile users, and mobile ads don't show up for desktop users. I don't use responsive units because they haven't performed as well.

Does the javascript for ALL the ads load regardless of device? For example, there's 4 desktop ad units, and 3 mobile ad units. If a mobile user views my site he will only see 3 ads. But even though he only sees 3, is the page actually loading all 7?
 
Assuming those are javascript and it's simply detecting viewport / screen size then yes, kind of.

The thing about javascript is in most cases, it doesn't actually fuck up anything. Just do it asynchronously and don't block page render (include it before /body, not head if you can).

If you actually want to block the piece of code from being delivered at all to mobile devices (or vice versa) you'll need server side code with an if / then / else statement.


edit: if you want to test this, load all 7 ad units on the desktop version and get a waterfall. then drop down to 3 and get that waterfall and then do it the way you have it set up (some on desktop, some on mobile) and do that waterfall and compare the 3 numbers.
 
Checked the waterfall and yeah, all are loading.

I tried setting up the server side stuff just now, fucked it up, haha. So put it back. Do you know if there's a way to block the sidebar from rendering when viewed on mobile? If I can do that, that should increase mobile speed quite a bit.
 
Whoa, awesome! Thanks @dresden I'll try that tonight!
 
Back