Wordpress puts the domain name in every single image, css LINK element and any other reference. Many users have issues because of this when it comes to moving the page or accessing it from multiple domains. There are only a few situations in multisites when the behaviour is helpful because some assets are shared.
It is not possible to clear the siteurl option field in admin interface. What is the best way of getting rid of the domain? I read in the Wordpress source code. All these URL generating functions directly use the option siteurl. So the best way seems to be clearing siteurl in wp_options table, but this breaks Wordpress.
Another approach would be hooking into site_url action. But this has a strange behaviour restoring full URLs and is not always called.