[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.
Post Reply
User avatar
alina
Verified Member
Verified Member
Posts: 242
Joined: July 6th, 2018, 9:06 am

[BUSINESS] double "//" in urls?

#1

Post by alina » May 10th, 2022, 11:04 am

Some what confused why are some sits using "//" in the url or is that a typo error?




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

#2

Post by tacnet » May 10th, 2022, 11:41 am

ok thats because they leave out the protocol (https or http). This is usually done when pulling in CSS style sheets or javascript files

If your page is on https then it will use https to pull up that resource. If not, it will use http

Its a way of avoiding blocked resource errors (ie your page is https but you are tying to pull in an http resource)

Hope that makes sense

User avatar
alina
Verified Member
Verified Member
Posts: 242
Joined: July 6th, 2018, 9:06 am

#3

Post by alina » May 10th, 2022, 11:55 am

Now I get it thanks can I ask another url question here.
Is it best to call images like this /images/image1.jpg or use the full url
Thank you for the explanation.




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

#4

Post by tacnet » May 10th, 2022, 12:10 pm

Its better to use relative urls ie /images/image1.jpg if the images are on the same domain as the page

Using the full url will open up another http port for each image which slows the page down

If the images are on another domain then, of course you must use the full URL but you can still speed things up by adding

Code: Select all

<link rel="preconnect" href="https://otherdomain.com">
in your <head> tag. This tells the browser to establish a connection with that domain as soon as the page is loaded. It will then use that connection to fetch any images rather than opening a new port for each image.

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 11th, 2022, 6:57 am

TAC I know about open ports but do they close once the image is loaded and the page closed?
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 11th, 2022, 12:17 pm

AlexO wrote: ↑
May 11th, 2022, 6:57 am
TAC I know about open ports but do they close once the image is loaded and the page closed?
Hi AlexO

Yes once once the page is closed then any open ports will be closed too

hope that answers your question

blingman
Verified Member
Verified Member
Posts: 1134
Joined: May 13th, 2018, 11:19 am

#7

Post by blingman » May 12th, 2022, 7:33 pm

tacnet wrote: ↑
May 11th, 2022, 12:17 pm
AlexO wrote: ↑
May 11th, 2022, 6:57 am
TAC I know about open ports but do they close once the image is loaded and the page closed?
Hi AlexO

Yes once once the page is closed then any open ports will be closed too

hope that answers your question
What I always thought was how it worked




JamesNet
Verified Member
Verified Member
Posts: 267
Joined: April 20th, 2018, 11:02 am

#8

Post by JamesNet » May 17th, 2022, 8:35 am

tacnet wrote: ↑
May 10th, 2022, 12:10 pm
Its better to use relative urls ie /images/image1.jpg if the images are on the same domain as the page

Using the full url will open up another http port for each image which slows the page down

If the images are on another domain then, of course you must use the full URL but you can still speed things up by adding

Code: Select all

<link rel="preconnect" href="https://otherdomain.com">
in your <head> tag. This tells the browser to establish a connection with that domain as soon as the page is loaded. It will then use that connection to fetch any images rather than opening a new port for each image.
Hmm never knew about the header part I'll start using it, thanks for that, I have my images on one domain call them from other domains on my server, instead of uploading the same images to multiple domains and taking up disk space.




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

#9

Post by tacnet » May 17th, 2022, 8:09 pm

JamesNet wrote: ↑
May 17th, 2022, 8:35 am
tacnet wrote: ↑
May 10th, 2022, 12:10 pm
Its better to use relative urls ie /images/image1.jpg if the images are on the same domain as the page

Using the full url will open up another http port for each image which slows the page down

If the images are on another domain then, of course you must use the full URL but you can still speed things up by adding

Code: Select all

<link rel="preconnect" href="https://otherdomain.com">
in your <head> tag. This tells the browser to establish a connection with that domain as soon as the page is loaded. It will then use that connection to fetch any images rather than opening a new port for each image.
Hmm never knew about the header part I'll start using it, thanks for that, I have my images on one domain call them from other domains on my server, instead of uploading the same images to multiple domains and taking up disk space.
Glad it helped. Thats exactly the kind of situation its used for

Also for people with CDNs. Usually a CDN will be setup as a seperate subdomain (so in our case all our pages are on https://www.tacamateurs.com but all our images are on our CDN https://cdn-w.tacamateurs.com so we use the preconnect statement in all our <head> tags to open up a port for all the images )

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

#10

Post by tacnet » May 17th, 2022, 8:11 pm

tacnet wrote: ↑
May 17th, 2022, 8:09 pm
JamesNet wrote: ↑
May 17th, 2022, 8:35 am
tacnet wrote: ↑
May 10th, 2022, 12:10 pm
Its better to use relative urls ie /images/image1.jpg if the images are on the same domain as the page

Using the full url will open up another http port for each image which slows the page down

If the images are on another domain then, of course you must use the full URL but you can still speed things up by adding

Code: Select all

<link rel="preconnect" href="https://otherdomain.com">
in your <head> tag. This tells the browser to establish a connection with that domain as soon as the page is loaded. It will then use that connection to fetch any images rather than opening a new port for each image.
Hmm never knew about the header part I'll start using it, thanks for that, I have my images on one domain call them from other domains on my server, instead of uploading the same images to multiple domains and taking up disk space.
Glad it helped. Thats exactly the kind of situation its used for

Also for people with CDNs. Usually a CDN will be setup as a seperate subdomain (so in our case all our pages are on https://www.tacamateurs.com but all our images are on our CDN https://cdn-w.tacamateurs.com so we use the preconnect statement in all our <head> tags to open up a port for all the images. Thats one of the reasons why our pages load so fast)

User avatar
Terry
Verified Member
Verified Member
Posts: 774
Joined: March 5th, 2018, 6:23 pm

#11

Post by Terry » May 18th, 2022, 11:36 am

tacnet wrote: ↑
May 17th, 2022, 8:11 pm
tacnet wrote: ↑
May 17th, 2022, 8:09 pm
JamesNet wrote: ↑
May 17th, 2022, 8:35 am


Hmm never knew about the header part I'll start using it, thanks for that, I have my images on one domain call them from other domains on my server, instead of uploading the same images to multiple domains and taking up disk space.
Glad it helped. Thats exactly the kind of situation its used for

Also for people with CDNs. Usually a CDN will be setup as a seperate subdomain (so in our case all our pages are on https://www.tacamateurs.com but all our images are on our CDN https://cdn-w.tacamateurs.com so we use the preconnect statement in all our <head> tags to open up a port for all the images. Thats one of the reasons why our pages load so fast)


Live and learn I honestly did not know about the

Code: Select all

<link rel="preconnect" href="https://otherdomain.com">
and I will add it to my headers after i get done here.

Thanks tacnet




calista
Verified Member
Verified Member
Posts: 1988
Joined: February 20th, 2018, 6:15 pm
Title: Manila Babe

#12

Post by calista » May 19th, 2022, 9:24 am

It must be a habit I always use the url to images




User avatar
gotonudecom
Verified Member
Verified Member
Posts: 3169
Joined: February 6th, 2018, 1:54 pm
Title: DomainMaster
Referrals: 30
Contact:

#13

Post by gotonudecom » May 19th, 2022, 12:05 pm

Do you know how wordpress handles all this/ by default?




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

#14

Post by tacnet » May 19th, 2022, 5:19 pm

I would imagine the pre-connect link is something you have to add to your template

I dont use Wordpress much but I guess it wouldn't know what other domains you need to link to so you would have to manually add it

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

#15

Post by badkitty » 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




[BUSINESS] double "//" in urls?

Post Reply