<base> do you use it?

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,236
I have known about the base tag since forever, but could never really see how I would use it up until a day ago when I started using and exploring CDNs

This changed my world:

<base href="http://myCDN.maxcdn.com/assets/">


HTML:
<!-- Document Title -->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->

<title>Page Title</title>

<!-- Base URL to use for all relative URLs contained within the document -->
<base href="http://myCDN.maxcdn.com/assets/">

<!-- External CSS -->
<link rel="stylesheet" href="path/main.css">

<!-- In-document CSS -->
<style>
  /* ... */
</style>
 

Noah

Expert Member
Joined
Jan 21, 2008
Messages
1,539
Nah, I just let it imply everything is at my domain/*
I serve more local than external ****.
I self host any javascript css etc's because
>trusting a remote host
 

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,236
Nah, I just let it imply everything is at my domain/*
I serve more local than external ****.
I self host any javascript css etc's because
>trusting a remote host

For small sites sure, but for larger sites a CDN even if the CDN is self hosted solution somewhere else it is a must.

An example I can think of is a listing website, it may simplify link referencing a lot.
 
Last edited:

Noah

Expert Member
Joined
Jan 21, 2008
Messages
1,539
For small sites sure, but for larger sites a CDN even if the CDN is self hosted solution somewhere else it is a must.

How big are your sites? Just wondering, I average 5 reqs/s to my server and it's essentially idling.
 

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,236
How big are your sites? Just wondering, I average 5 reqs/s to my server and it's essentially idling.

Personal websites not so much, work websites are in the 2r/s range then ad hoc a few listing/auction websites I am involved with does on average around 33r/s this is combined with their APP so not entirely just the site itself.

Point is, it should not really matter how big our sites are, but instead ensuring that it's all build as optimally as possible for both the end user and the host (storage space is expensive when you have 100s of GBs of files in my case.)

In my case, this is my case just me. Please this is not a CDN vs Non CDN thread.

So in my case, the particular site I am working on has an international audience so I can either build out my own racks near my users (most likely expensive to do) or I can pay a CDN to cache my content for my users locally. It works out cheaper for me it's $9 a month for a TB of space

^ That is why I use a CDN

I use MaxCDN, but thinking of moving to BunnyCDN @ $0.015/GB
 
Last edited:

Noah

Expert Member
Joined
Jan 21, 2008
Messages
1,539
So in my case, the particular site I am working on has an international audience so I can either build out my own racks near my users (most likely expensive to do) or I can pay a CDN to cache my content for my users locally. It works out cheaper for me it's $9 a month for a TB of space

^ That is why I use a CDN

I use MaxCDN, but thinking of moving to BunnyCDN @ $0.015/GB

Ah ok, my servers are being hammered because they are essentially CDN's for certain "fully legal" "chinese cartoon" sites.

Let me know what the response time difference is like between CDN vs non-CDN.
 

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,236
Ah ok, my servers are being hammered because they are essentially CDN's for certain "fully legal" "chinese cartoon" sites.

Let me know what the response time difference is like between CDN vs non-CDN.

:D :crylaugh:

"chinese cartoons"
 

scudsucker

Executive Member
Joined
Oct 16, 2006
Messages
9,024
Thor, 33 requests per second is not a valid load to convince you you need a CDN.

Maybe when it gets up to 1000. Maybe. Unless your hosting is super-***
 

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,236
Thor, 33 requests per second is not a valid load to convince you you need a CDN.

Maybe when it gets up to 1000. Maybe. Unless your hosting is super-***
That was not my reasons for a cdn....
 
Top