[BUSINESS] Page speed tips

Discussion Of All Legal Topics Is Fine Anything Goes. Be Respectful of Others. No Personal Information or Attacks.
All Traffic, Link, Banner, Push Notification and Advertising, Offers & Requests Here,.
Domains & Websites For Sale and Requests Here.
Keep One thread per person & No More Than 1 Weekly Bump.
Post Reply
User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

[BUSINESS] Page speed tips

#1

Post by tacnet » May 21st, 2022, 6:21 pm

A few people have been asking about this recently so I thought i would start a thread

Im NOT the expert and this is by no means an exhaustive list, but here's a few tips ive picked up over the years that you might find useful. Feel free to add
  • Pre-Connect to other domains If your pulling a lot of images/resources from another domain then use the rel="peconnect" link in your header to tell the browser to establish a connection with that domain as soon as the page is loaded and then use that connection to fetch your images. Rather than opening up a new http port for each image.

    Code: Select all

    <link rel="preconnect" href="https://otherdomain.com">
  • DNS-Prefetch to other domains For less critical resources (or for browsers that dont support preconnect), you can use rel="dns-prefetch" which resolves the domain name to an IP address ready to open a port when needed. Yes you can pair both preconnect and pre-fetch so if preconnect isnt supported, it will pre-fetch the domain instead.

    Code: Select all

    <link rel="preconnect" href="https://otherdomain.com">
    <link rel="dns-prefetch" href="https://otherdomain.com">
    
  • CSS at the top, Javascript at the bottom The browser needs to process your CSS file first in order to display the page so link to that in your <head> tag. Most of the time, javascript is NOT needed to display the page so you can link to that at the bottom of the page. You can also use the defer keyword to defer loading until the page is finished

    Code: Select all

    <script  defer src="myjavascript.js" type="text/javascript"></script>
  • Specify image dimensions Wherever possible, you should specify your image dimensions, either via CSS or in the html itself. Otherwise the browser has to load the image before it can work out how much space to allow for it. This leads to the page jumping about as it loads (called Cumulative Shift) and really degrades the user experience and slows down the page
  • Lazy Load EVERYTHING Wherever possible, you should lazyload your images/iframes. This simply means that the image isnt loaded until the user scrolls it into view which massively speeds up page loading. There's lots of scripts that do this. A good simple one to use is https://github.com/aFarkas/lazysizes
  • DONT Ajax load the top of your page A lot of sites do this, often its a banner rotator or similar script that loads content into view at the top of the page (ie above the fold). There's a big problem with this, the page has to fully load first AND process all the javascript before it can make yet another call to dislay the banner/content via ajax. All the while, the user is left staring at a big blank space on the screen. Keep ajax for out of view stuff
  • Mobile First CSS Generally speaking, mobiles run on a slower connection than desktops so your css should always layout the mobile screen first and then only load the desktop css if its needed. You can use css media queires to do this

In the adult industry, page speed is critical. Its the most competitive industry on the planet and often you only have a split second to engage the user before he switches to another site. A slow site will massively drive up your bounce rate

Hope somebody finds this useful

User avatar
TheButcher
Administrator
Administrator
Posts: 17533
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#2

Post by TheButcher » May 21st, 2022, 6:25 pm

Just to add a couple of tools I use.


https://pagespeed.web.dev/
https://geopeeker.com/

razor
Verified Member
Verified Member
Posts: 1656
Joined: March 4th, 2018, 8:34 am

#3

Post by razor » May 21st, 2022, 6:48 pm

Just asking is it true antivirus softwares block javascript and or pop a warning?




User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

#4

Post by tacnet » May 21st, 2022, 6:57 pm

razor wrote: ↑
May 21st, 2022, 6:48 pm
Just asking is it true antivirus softwares block javascript and or pop a warning?
No. Almost all sites use javascript these days. The internet wouldn't work without it

User avatar
AlexO
Verified Member
Verified Member
Posts: 6409
Joined: February 10th, 2018, 5:37 pm
Title: I like Celebrities

#5

Post by AlexO » May 22nd, 2022, 8:44 am

It is all about the speed, no one wants a slow loading site, I close the page if it starts taking time. I am sure most people are like me.
Give me celebrity porn :twisted:

User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

#6

Post by tacnet » May 22nd, 2022, 12:24 pm

AlexO wrote: ↑
May 22nd, 2022, 8:44 am
It is all about the speed, no one wants a slow loading site, I close the page if it starts taking time. I am sure most people are like me.
Thats exactly what users do.

As a rough guideline, you should aim to have the viewport filled and displayed (called the Largest Contentful Paint or LCP) within 2.5 seconds or less. Anything more than that and your bounce rate will start going up sharply

Google's Page Speed Index (or any of the other page speed tools mentioned above) will tell you what your LCP time is

User avatar
jag
Verified Member
Verified Member
Posts: 6543
Joined: February 15th, 2018, 9:51 am
Title: From Malta with love
Referrals: 1

#7

Post by jag » May 23rd, 2022, 7:12 am

tacnet wrote: ↑
May 22nd, 2022, 12:24 pm

Google's Page Speed Index (or any of the other page speed tools mentioned above) will tell you what your LCP time is
Trying to remember what this was called in the past,I am pretty certain it had another name.
From Malta with love and sunshine

Gefreksiy
Verified Member
Verified Member
Posts: 40
Joined: February 6th, 2022, 6:38 am

#8

Post by Gefreksiy » May 26th, 2022, 7:54 am

tacnet wrote: ↑
May 21st, 2022, 6:21 pm
A few people have been asking about this recently so I thought i would start a thread

Im NOT the expert and this is by no means an exhaustive list, but here's a few tips ive picked up over the years that you might find useful. Feel free to add
  • Pre-Connect to other domains If your pulling a lot of images/resources from another domain then use the rel="peconnect" link in your header to tell the browser to establish a connection with that domain as soon as the page is loaded and then use that connection to fetch your images. Rather than opening up a new http port for each image.

    Code: Select all

    <link rel="preconnect" href="https://otherdomain.com">
  • DNS-Prefetch to other domains For less critical resources (or for browsers that dont support preconnect), you can use rel="dns-prefetch" which resolves the domain name to an IP address ready to open a port when needed. Yes you can pair both preconnect and pre-fetch so if preconnect isnt supported, it will pre-fetch the domain instead.

    Code: Select all

    <link rel="preconnect" href="https://otherdomain.com">
    <link rel="dns-prefetch" href="https://otherdomain.com">
    
  • CSS at the top, Javascript at the bottom The browser needs to process your CSS file first in order to display the page so link to that in your <head> tag. Most of the time, javascript is NOT needed to display the page so you can link to that at the bottom of the page. You can also use the defer keyword to defer loading until the page is finished

    Code: Select all

    <script  defer src="myjavascript.js" type="text/javascript"></script>
  • Specify image dimensions Wherever possible, you should specify your image dimensions, either via CSS or in the html itself. Otherwise the browser has to load the image before it can work out how much space to allow for it. This leads to the page jumping about as it loads (called Cumulative Shift) and really degrades the user experience and slows down the page
  • Lazy Load EVERYTHING Wherever possible, you should lazyload your images/iframes. This simply means that the image isnt loaded until the user scrolls it into view which massively speeds up page loading. There's lots of scripts that do this. A good simple one to use is https://github.com/aFarkas/lazysizes
  • DONT Ajax load the top of your page A lot of sites do this, often its a banner rotator or similar script that loads content into view at the top of the page (ie above the fold). There's a big problem with this, the page has to fully load first AND process all the javascript before it can make yet another call to dislay the banner/content via ajax. All the while, the user is left staring at a big blank space on the screen. Keep ajax for out of view stuff
  • Mobile First CSS Generally speaking, mobiles run on a slower connection than desktops so your css should always layout the mobile screen first and then only load the desktop css if its needed. You can use css media queires to do this

In the adult industry, page speed is critical. Its the most competitive industry on the planet and often you only have a split second to engage the user before he switches to another site. A slow site will massively drive up your bounce rate

Hope somebody finds this useful

All this is new to me. Doeswordpress come with any of these built in?




User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

#9

Post by tacnet » May 26th, 2022, 11:30 am

Gefreksiy wrote: ↑
May 26th, 2022, 7:54 am

All this is new to me. Doeswordpress come with any of these built in?
Sorry, I dont use wordpress that much so somebody else would have to answer that one

Its very easy to check though. Simply RIGHT click on your page and select View Source and have a look at your HTML code.

Do all the images have a width and height specified ? Is the CSS at the top and the Javascript at the bottom ? etc etc

Hope that helps

User avatar
LuKenGas
Verified Member
Verified Member
Posts: 2214
Joined: February 23rd, 2018, 8:07 am

#10

Post by LuKenGas » May 27th, 2022, 8:06 am

tacnet wrote: ↑
May 26th, 2022, 11:30 am
Gefreksiy wrote: ↑
May 26th, 2022, 7:54 am

All this is new to me. Doeswordpress come with any of these built in?
Sorry, I dont use wordpress that much so somebody else would have to answer that one

Its very easy to check though. Simply RIGHT click on your page and select View Source and have a look at your HTML code.

Do all the images have a width and height specified ? Is the CSS at the top and the Javascript at the bottom ? etc etc

Hope that helps


I just checked one of my blogs and they sure do not have the width and height specified.




alsporn
Verified Member
Verified Member
Posts: 602
Joined: May 12th, 2018, 4:35 pm

#11

Post by alsporn » May 28th, 2022, 10:06 am

Github is a nice resources - just saying.




User avatar
tacnet
Board Sponsor
Board Sponsor
Posts: 3641
Joined: February 22nd, 2019, 7:21 pm
Referrals: 9
Contact:

#12

Post by tacnet » May 28th, 2022, 1:11 pm

LuKenGas wrote: ↑
May 27th, 2022, 8:06 am

I just checked one of my blogs and they sure do not have the width and height specified.
This is a common issue. You'll probably find that the width is being set by CSS (RIGHT click the image and select Inspect. In the bottom right corner, you will see the css rules that apply to that image. You'll probably see width: 100% and max-width: whatever pixels)

But by not setting the height, it means that the browser cannot layout the page until it has loaded each and every image. This not only slows the page up, it makes the page jump about as it re-draws itself over and over as each image is loaded (called cumulative shift)

Its not good practise (and Im sure wordpress will have a setting somewhere for it) but it really only comes into play if you have a lot of images on your page

hope thats of some help

@alsporn - Yep github is a great source for scripts etc

User avatar
trafficseller
Verified Member
Verified Member
Posts: 1142
Joined: March 1st, 2018, 6:44 pm

#13

Post by trafficseller » May 29th, 2022, 12:23 pm

Speed is a very important don't let any one tell you otherwise. No one likes a slow as molasses page.
Always looking to make deals with world wide traffic ping me if inetrested

User avatar
viking
Verified Member
Verified Member
Posts: 1420
Joined: March 18th, 2018, 8:28 pm

#14

Post by viking » May 30th, 2022, 7:36 am

trafficseller wrote: ↑
May 29th, 2022, 12:23 pm
Speed is a very important don't let any one tell you otherwise. No one likes a slow as molasses page.
word




User avatar
badkitty
Verified Member
Verified Member
Posts: 1431
Joined: February 6th, 2018, 11:33 am

#15

Post by badkitty » May 31st, 2022, 8:25 am

Fast cars win races and fast pages get results all there is to it




[BUSINESS] Page speed tips

Post Reply