4 ms·
There are few techniques you could use that don't affect the visitor experience of your own. - Detect referrer and return a script that has a warning - Rotate
by martin-adams 13y ago
There are few techniques you could use that don't affect the visitor experience of your own.
- Detect referrer and return a script that has a warning
- Rotate your script filenames so those hotlinking will soon realise they will need to host it themselves
- Use a CDN yourself and don't encourage them to hotlink
- Slow down the request
For those hotlinking, consider:
- You can't trust the source of the code
- You can't trust that the code will always be there and it will load quickly
- You can't trust the contents of the code may change and break your application
If you want to be sinister to those hotlinking you could:
- Redirect the user (as others have noted)
- Display any message to the user
- Steal data from the user who is using the site hotlinking
- Inject your own adverts into the target web page
- Make the web page do the Harlem Shake