3 ms·
Immediately found a bunch of elements I had never heard of. This is really neat.
by seph-reed 7y ago
Immediately found a bunch of elements I had never heard of. This is really neat.
- The_rationalist 7y agoEspecially <base>
- cj 7y agoI've found this especially useful when rendering proxied web pages
- munk-a 7y ago<base> was super nice in the old days when I worked with servers without subdomains for staging/testing, it made it pretty trivial to have domain.tld/website and domain.tld/testing/website ... granted, those were dark days and I'd never use that approach now, but it was appreciated.
- berkut 7y agoOut of interest, what would you use instead these days?
- munk-a 7y agoOh, usually <base> is still bound to the server root name, but in most cases an SPA or what-have-ye will be served off the base subdomain with client side routing hints - then everything can just be referenced using stripped down relative URLs. Actually though, for the server-side processed stuff we are still using <base> to make sure that /fancy/bespoke/url/style URLs doesn't try to grab assets from /fancy/bespoke/url/style/styles/main.css - I guess it's less that I don't use it and more that now-a-days I rarely set it to anything other than domainname since I'll just materialize a new subdomain if I need to do something fancy.
- WiseWeasel 7y agoA combination of sane, centralized routing and view layout, relative paths, and getting the scheme/host from the framework or environment config if really needed.