I have a blog out there, for the sake of this answer you may take a look at it: http://blog.alphasmanifesto.com/. I'm currently working my way through some performance optimizations.

As you may see, the main HTML is currently at 8.5 KBs. Between category, permalinks, tags, navigation and some other link out there, there is a total of 190 references to the same base path: "http://blog.alphasmanifesto.com" (32 characters).

I've made some small math and I think I would be able to cut around 5 KBs if I were to make most of these into relative links.

Now, here's the question: I know that there are some unintended side effects with making every link a relative link in Wordpress, but still, I would like to make the best out of every possible byte.

So, what approach would better improve the serving size of the HTML page while keeping these unintended side-effects to a minimum?

In the case where you decide that relative links is the right way to go, please elaborate on what method you would use -- I've been looking around and there are may ways in which that can be done in Wordpress.

  • I wouldn't go through all this hassle for only 5kb. The performance loss is so little that it is unnoticeable. Try to fix something with greater impact. Jun 8 '14 at 19:48

It's a valid theory and under some circumstances such micro-optimization might make a difference (making content fit into single packet rather than be split into two).

However you misinterpret the size information. 8.5KB is gzip-compressed version of your page. Since repeats of same string are highly compressible, your optimization won't reduce this by 5KB.

How much would it actually? From quick test by about 100 bytes. :) Which is completely not worth worrying about.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.