7
8 Comments

Increased Landing Page Performance

Get ready for a wild ride!

Cloudflare is slow?

Having to decide how the new landing page will look like I first looked at the current one and while browsing I realized that every page load time took at least 2 seconds. After some investigation the cause seemed to be that TTFB (time-to-first-byte) was over 1 second.

I do have Cloudflare caching (which I mostly use for the free SSL certificate), but after some more checking I noticed that the HTML itself was not properly cached. I quickly added a Page rule to Cache everything on all pages, and now the TTFB is 30ms when the cache is hit!

Removed Facebook Pixel

After this, I decided to ditch the Facebook Pixel I had installed on the page, reasons being:

  • It was initially added to create a lookalike audience for Facebook ads. I have decided to no longer use Facebook ads for various reasons, most improtant being the low quality of traffic sent and a poor Ads Manager interface.
  • I don't want to send all my visitors data to Facebook. I don't want to help Facebook collect data from my users.
  • Having more JavaScript on the page means a slower page, not only because it has to be downloaded but because of the time it takes to parse, interpret and execute this JavaScript. Downloading can be done in parallel, but the aforementioned JS processes are thread-blocking.

Next steps: ZERO 3rd party scripts

I am planning to slowly eliminate all 3rd party code on the page, in this order:

  • Mailchimp newsletter popup - I will create my own form, be it in a pop-up or not.
  • Google Analytics - After userTrack v3 is released I will try living without GA and see how it goes.
  • Tawk.to live chat - This is harder, as I do want live chatting on my site. I will think of a solution.

Why am I doing this?

I want to see what are the actual pain points of going completely independent*. (*hosting, CDN, DNS, ISP, etc. are still probably handled by someone else)

In order to make a good product you really have to understand the problem that you are solving.

I know this post was all over the place, but somehow it's all connected: performance, privacy, 3rd parties.

Thank you! 🙌

Question for you

What do you think about 3rd party scripts affecting performance and privacy? Is it an actual problem or are we worrying for nothing?

PS: I think even the current (old) landing page performance is pretty good, let me know if it's slow for you: userTrack.net

  1. 2

    We have a SaaS for landing pages so think about this problem all the time :)

    For Tawk.to you can put a delay either time or scrolling which will keep the website fast :) that is what we do for Crisp chat.

    1. 1

      Putting a delay is a good idea for both Tawk.to and Mailchimp, I will try it (as an intermediate step before replacing them).

      What about privacy with 3rd party scripts and the possibility that their code changes and somehow affects your site? Is that a concern?

      1. 1

        I believe there are services that test your site hourly and daily. Some are even free.

  2. 2

    Page load times are important.
    Specially people getting above the 1sec mark is a big deal IMHO. (due many WP sites are >2.5sec). If you want super fast, consider static page platforms, where everything dynamic can be added post load like commenting for example...

    You can put most JS post page load which is way less of an issue.

    IH btw is pretty slow and still gets all of this action because the value is just too good in a way. (also not a lot of competition and uses some "entertainment" with the initial quotes to distract a bit, which I'm not for..)

    At the end of the day, this shouldn't be your number 1 concern, delivery value first, make it better second :shrug:

    1. 2

      Thanks for the reply! I agree with you, page load time might only be important only when you compare yourself to the competition.

      I acually tweeted this a while ago:

      Make your product so valuable that people are willing to wait for a slow page load.

      My issue with 3rd party JS is that you don't know what it does l, when it does and it can change at anytime without notice. Delaying it usually solves the initial page load issue, but might introduce stuttters while the user is browsing, although not as important.

      I will actually test delaying the mailchimp script for now and see if the page speed improves.

  3. 1

    The performance of the landing page might be beneficial for SEO optimization as well. I have been using the Lighthouse tool from Google Chrome to audit my personal web page and the 3rd party JS scripts are always the slowest ones and downgrade the performance.

    You might also try to compress some images, apply lazy loading, convert them to webp format, etc. in order to further improve the loading speed.

    1. 2

      The problem with 3rd party scripts is usually that they are always a lot more bloated than they need to. What could be a 100 chars JavaScript to show the Mailchimp pop-up now is 250KB! They probably add analytics, include jQuery just to show an animation and other things like this which could be avoided when coded with more attention. Maybe the speed difference is not noticeable for one script, but once you start using more and more you realize how much "dodgy" JavaScript you have on your page.

      I never used webp before because of the limited browser support. I think it makes sense to conditionally use wepb on the browesrs that support it (using srcset or something like that), but for I don't like implementing fixes only for specific browsers.

  4. 1

    Nice! I’ll see if I can improve load times as well with cloudflare cache, not sure if I configured that correctly.

    I have most third party scripts on a delay (simple setTimeout). Crisp waits around four seconds before initializing, sentry the same. Only analytics loads immediately.

Trending on Indie Hackers
How I grew a side project to 100k Unique Visitors in 7 days with 0 audience 49 comments Competing with Product Hunt: a month later 33 comments Why do you hate marketing? 29 comments My Top 20 Free Tools That I Use Everyday as an Indie Hacker 18 comments $15k revenues in <4 months as a solopreneur 14 comments Use Your Product 13 comments