[BUSINESS] double "//" in urls?

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.
User avatar
gotonudecom
Verified Member
Verified Member
Posts: 3169
Joined: February 6th, 2018, 1:54 pm
Title: DomainMaster
Referrals: 30
Contact:

#16

Post by gotonudecom » May 20th, 2022, 2:47 pm

badkitty wrote: ↑
May 20th, 2022, 8:02 am
gotonudecom wrote: ↑
May 19th, 2022, 12:05 pm
Do you know how wordpress handles all this/ by default?
yeppers they got that part coded right

So after wordpress, I need to watch how my plugins are handling this?

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

#17

Post by tacnet » May 20th, 2022, 5:30 pm

Ok just to expand on this a bit, there's several link types you can use in your head tag to speed things up. The two main ones are preconnect and dns-prefetch :-

Code: Select all

<link rel="dns-prefetch" href="https://otherdomain.com">

<link rel="preconnect" href="https://otherdomain.com">
dns-prefetch resolves the domain name to an IP address ready to establish a connection.

preconnect resolves the domain name, establishes a connection and does a TLS handshake

Basically use preconnect for critical resources (ie domains where you are pulling lots of images and/or resources from) but dont overdo it. Some browsers will limit the number of connections open at any one time so you dont want to be establishing a preconnect if you dont need it

For less critical resources, use the dns-prefetch as that doesnt open a connection but merely resolves the domain name

hope this useful

User avatar
shoopa
Verified Member
Verified Member
Posts: 1852
Joined: February 26th, 2018, 7:32 pm

#18

Post by shoopa » May 20th, 2022, 6:06 pm

tacnet wrote: ↑
May 20th, 2022, 5:30 pm
Ok just to expand on this a bit, there's several link types you can use in your head tag to speed things up. The two main ones are preconnect and dns-prefetch :-

Code: Select all

<link rel="dns-prefetch" href="https://otherdomain.com">

<link rel="preconnect" href="https://otherdomain.com">
dns-prefetch resolves the domain name to an IP address ready to establish a connection.

preconnect resolves the domain name, establishes a connection and does a TLS handshake

Basically use preconnect for critical resources (ie domains where you are pulling lots of images and/or resources from) but dont overdo it. Some browsers will limit the number of connections open at any one time so you dont want to be establishing a preconnect if you dont need it

For less critical resources, use the dns-prefetch as that doesnt open a connection but merely resolves the domain name

hope this useful


Is it alright to add both just to be safe and have the pages load fast?




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

#19

Post by tacnet » May 20th, 2022, 6:19 pm

shoopa wrote: ↑
May 20th, 2022, 6:06 pm
tacnet wrote: ↑
May 20th, 2022, 5:30 pm
Ok just to expand on this a bit, there's several link types you can use in your head tag to speed things up. The two main ones are preconnect and dns-prefetch :-

Code: Select all

<link rel="dns-prefetch" href="https://otherdomain.com">

<link rel="preconnect" href="https://otherdomain.com">
dns-prefetch resolves the domain name to an IP address ready to establish a connection.

preconnect resolves the domain name, establishes a connection and does a TLS handshake

Basically use preconnect for critical resources (ie domains where you are pulling lots of images and/or resources from) but dont overdo it. Some browsers will limit the number of connections open at any one time so you dont want to be establishing a preconnect if you dont need it

For less critical resources, use the dns-prefetch as that doesnt open a connection but merely resolves the domain name

hope this useful
Is it alright to add both just to be safe and have the pages load fast?
Yes thats actually the best way to do it. If the browser doesnt support preconnect then use dns-prefetch as a fallback. So in other words, have your preconnect link first like so

Code: Select all

<link rel="preconnect" href="https://otherdomain.com">

<link rel="dns-prefetch" href="https://otherdomain.com">

User avatar
shoopa
Verified Member
Verified Member
Posts: 1852
Joined: February 26th, 2018, 7:32 pm

#20

Post by shoopa » May 20th, 2022, 6:24 pm

I pull images from 2 domains is this acceptable.



Code: Select all

<link rel="preconnect" href="https://otherdomain.com">
<link rel="preconnect" href="https://otherdomain2.com">

<link rel="dns-prefetch" href="https://otherdomain.com">
<link rel="dns-prefetch" href="https://otherdomain2.com">




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

#21

Post by tacnet » May 20th, 2022, 6:34 pm

shoopa wrote: ↑
May 20th, 2022, 6:24 pm
I pull images from 2 domains is this acceptable.



Code: Select all

<link rel="preconnect" href="https://otherdomain.com">
<link rel="preconnect" href="https://otherdomain2.com">

<link rel="dns-prefetch" href="https://otherdomain.com">
<link rel="dns-prefetch" href="https://otherdomain2.com">
Yep nothing wrong with that. The preconnect will resoolve the domain name and connect to it, if not the dns-prefetch will resolve the domain name only

User avatar
shoopa
Verified Member
Verified Member
Posts: 1852
Joined: February 26th, 2018, 7:32 pm

#22

Post by shoopa » May 20th, 2022, 7:13 pm

Thanks TAC




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

#23

Post by TheButcher » May 21st, 2022, 3:53 pm

What if the images are on the same domain, what can you do code wise to speed up page opening times?

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

#24

Post by tacnet » May 21st, 2022, 4:05 pm

TheButcher wrote: ↑
May 21st, 2022, 3:53 pm
What if the images are on the same domain, what can you do code wise to speed up page opening times?
If its on the same domain then use relative URLs where possible. Also consider your image filenames. eg image1.jpg means nothing to google, girl_with_big_boobs.jpg means a lot more.

Also Lazyload all your images (regardless of what domain they are on). We use https://github.com/aFarkas/lazysizes .

Its dead easy, just download the Javascript, hook it into your page, add class "lazyload" to all your images and change your img src tags to img data-src tags. eg

Code: Select all

<img data-src="image.jpg" class="lazyload" />
Although im not suggesting you would need it on this forum because there so few images anyway

pussylover
Verified Member
Verified Member
Posts: 988
Joined: March 6th, 2018, 10:30 am

#25

Post by pussylover » May 22nd, 2022, 8:05 pm

tacnet wrote: ↑
May 21st, 2022, 4:05 pm
TheButcher wrote: ↑
May 21st, 2022, 3:53 pm
What if the images are on the same domain, what can you do code wise to speed up page opening times?
If its on the same domain then use relative URLs where possible. Also consider your image filenames. eg image1.jpg means nothing to google, girl_with_big_boobs.jpg means a lot more.

Also Lazyload all your images (regardless of what domain they are on). We use https://github.com/aFarkas/lazysizes .

Its dead easy, just download the Javascript, hook it into your page, add class "lazyload" to all your images and change your img src tags to img data-src tags. eg

Code: Select all

<img data-src="image.jpg" class="lazyload" />
Although im not suggesting you would need it on this forum because there so few images anyway
Lazyload is a real sweet method to increase load times 34ddww




HeelMike
Verified Member
Verified Member
Posts: 491
Joined: July 14th, 2021, 12:37 pm
Title: Heels make me horny

#26

Post by HeelMike » May 26th, 2022, 4:10 pm

Interesting information here




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

#27

Post by tacnet » May 26th, 2022, 5:07 pm

HeelMike wrote: ↑
May 26th, 2022, 4:10 pm
Interesting information here
Glad it helped.

There was another thread on this at https://www.sponsorchat.com/viewtopic.php?f=74&t=6749

[BUSINESS] double "//" in urls?

Post Reply