Does anyone have an idea of what's the impact on a website performances when activating Hotlink protection on server.
FYI: hotlink protection disallows other websites on other servers to place an image on their websites that directly refers to my websites. For instance let's say mywebsite.com is including an img file called test.jpg, anotherwebsite.com can NOT place in its pages this line:
<img src="http://mywebsite.com/test.jpg">
because mywebsite.com server would recognize that such request is not coming from mywebsite.com and stops the request, therefor anotherwebsite.com woudl display nothing in place of the image.
Actually my websites on which I activated Hotlink protection do not seem to run slower. But I'm just wondering waht's behind it, I suppose Apache web server needs to check for every request for an image and see where such request comes from, so in some way it should decrease performances.
Apache is going to check where every request comes from anyway (since it has to be able to send it back), so hotlink protection will definitely not hurt performance.
HTTP requests have a header field called "Referer". This is simply the URL from which you made the current request. This field is sent by browsers on most requests. (There's no referer if you typed a URL in the address bar. And you can configure your browser to not use one, or to fake one...) The hotlink protection you mention simply checks if the referer value is from a different domain than yours, and blocks or redirects the request if that's the case.
So, yes, there's obviously some overhead involved in making this check. But probably not huge. (I honestly can't say) I'd recommend you just pay attention to the server resource usage.