Home > Mobile >

1 Strange Trick to remove 40KBytes of data from your mobile landing pages (5)


02-02-2014 07:41 AM #1 dario (Member)
1 Strange Trick to remove 40KBytes of data from your mobile landing pages

This trick allowed me to slightly improve CTR due to faster-loading landing pages.

Users usually check their carrier's home page for new offers / plans / email and so on.

For a LP aimed to Vodafone users, for example, I was using this
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>

but I switched the jquery version in use on my LPs aimed to Vodafone users, copy pasting the exact same version was in use on m.vodafone.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

Doing so the jQuery file is not downloaded and it's instantly loaded from browser's cache instead.

I'll do the same for the other carriers of course.

To avoid duplicating LPs for each carrier I'll try to use a PHP switch-case checking the carrier and loading the right version of jquery.


02-02-2014 12:26 PM #2 redrummr (Member)

Depending on the code used on the lander, you can do away with jquery and code just the JS straight up, if you're only using a few functions. You can pay to convert your jquery-assisted code into exact javascript (biggest difference in file size).

For mobile (and desktop), I would suggest using alternatives to jquery.

Examples for mobile:
Zepto is 8kb and works with Android and iOS for most functions.
$dom is 2kb and can do animations e.g. if your lander uses a fancy "checking for viruses" bar.

I will never be caught using js-min. Campaigns live on speed...


02-02-2014 12:54 PM #3 bbrock32 (Administrator)

Another vote for zepto.js. Can do pretty much all the fancy stuff we use and is much lighter.


02-03-2014 05:28 PM #4 caurmen (Administrator)

All very good tips!

Remember, too, that native JS can do an awful lot of things that you used to need JQuery for, too. Often you don't need a library at all!


02-04-2014 08:35 PM #5 rafael (Member)

I was just reading a very interesting (and lengthy) discussion on this on Hackernews:

You might not need jQuery:
https://news.ycombinator.com/item?id=7152068


Home > Mobile >