[BUSINESS] double "//" in urls?
- alina
- Verified Member

- Posts: 242
- Joined: July 6th, 2018, 9:06 am
[BUSINESS] double "//" in urls?
Some what confused why are some sits using "//" in the url or is that a typo error?
- tacnet
- Board Sponsor

- Posts: 3641
- Joined: February 22nd, 2019, 7:21 pm
- Referrals: 9
- Contact:
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
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
- alina
- Verified Member

- Posts: 242
- Joined: July 6th, 2018, 9:06 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.
Is it best to call images like this /images/image1.jpg or use the full url
Thank you for the explanation.
- tacnet
- Board Sponsor

- Posts: 3641
- Joined: February 22nd, 2019, 7:21 pm
- Referrals: 9
- Contact:
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
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.
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">- AlexO
- Verified Member

- Posts: 6409
- Joined: February 10th, 2018, 5:37 pm
- Title: I like Celebrities
TAC I know about open ports but do they close once the image is loaded and the page closed?
Give me celebrity porn 
- tacnet
- Board Sponsor

- Posts: 3641
- Joined: February 22nd, 2019, 7:21 pm
- Referrals: 9
- Contact:
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

- Posts: 1134
- Joined: May 13th, 2018, 11:19 am
What I always thought was how it worked
-
JamesNet
- Verified Member

- Posts: 267
- Joined: April 20th, 2018, 11:02 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.tacnet wrote: ↑May 10th, 2022, 12:10 pmIts 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
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.Code: Select all
<link rel="preconnect" href="https://otherdomain.com">
- tacnet
- Board Sponsor

- Posts: 3641
- Joined: February 22nd, 2019, 7:21 pm
- Referrals: 9
- Contact:
Glad it helped. Thats exactly the kind of situation its used forJamesNet wrote: ↑May 17th, 2022, 8:35 amHmm 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.tacnet wrote: ↑May 10th, 2022, 12:10 pmIts 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
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.Code: Select all
<link rel="preconnect" href="https://otherdomain.com">
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 )
- tacnet
- Board Sponsor

- Posts: 3641
- Joined: February 22nd, 2019, 7:21 pm
- Referrals: 9
- Contact:
tacnet wrote: ↑May 17th, 2022, 8:09 pmGlad it helped. Thats exactly the kind of situation its used forJamesNet wrote: ↑May 17th, 2022, 8:35 amHmm 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.tacnet wrote: ↑May 10th, 2022, 12:10 pmIts 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
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.Code: Select all
<link rel="preconnect" href="https://otherdomain.com">
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)
- Terry
- Verified Member

- Posts: 774
- Joined: March 5th, 2018, 6:23 pm
tacnet wrote: ↑May 17th, 2022, 8:11 pmtacnet wrote: ↑May 17th, 2022, 8:09 pmGlad 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">Thanks tacnet
-
calista
- Verified Member

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

- Posts: 3169
- Joined: February 6th, 2018, 1:54 pm
- Title: DomainMaster
- Referrals: 30
- Contact:
- tacnet
- Board Sponsor

- Posts: 3641
- Joined: February 22nd, 2019, 7:21 pm
- Referrals: 9
- Contact:
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
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
- badkitty
- Verified Member

- Posts: 1431
- Joined: February 6th, 2018, 11:33 am
yeppers they got that part coded rightgotonudecom wrote: ↑May 19th, 2022, 12:05 pmDo you know how wordpress handles all this/ by default?