6 ms·
The item itself is an HTML page. That is extremely unlikely to change, very unlike an extension like .php or .asp .
by gpvos 3y ago
The item itself is an HTML page. That is extremely unlikely to change, very unlike an extension like .php or .asp .
- apitman 3y agoWhat if they wanted to start offering raw markdown with content negotiation instead of HTML?
- KptMarchewa 3y agoServe it as .html endpoint too. It's pure syntax
- account42 3y agoUnlikely to change over what timeframe? Image formats on the web have moved from .gif to .jpeg/.png to .webp to .avif. Video and audio formats have always been a mess. For a time it seemed things would move to .xhtml. That the page is sent to your browser as HTML is not a defining attribute and could very well depend on HTTP content negotiation.
- plagiarist 3y agoGiven the endurance of legacy code, my opinion is that any PHP page is more likely to remain a .php than the HTML remain an .html.
- Symbiote 3y agoThat might be true now, but was not the case when PHP was fresh, new and exciting.
- MobiusHorizons 3y agoI think the point being made is that the contents of the file will be html whether it’s a static file on disk or dynamically generated using php. This may be more obvious when thinking about dynamically generated svg or pdf. Php nodes or python would be implantation details. HTML is the content type, and that is not likely to change.
- plagiarist 3y agoI agree with the extension from that perspective.
- hot_gril 3y agoThis is an aspirational abstraction. HTML will probably outlast most websites, and those .gifs are probably /foo.gif on every site too. Even if that somehow changes, it won't break the existing URLs. Less confusing to just call it what it is for the time being.
- gpvos 3y agoThat is a very formal way of looking at it. Moreover, this is rather simple hypertext, not an image. HTML, or a remarkably similar and compatible descendant of it, is likely to remain in use for centuries.
- plagiarist 3y agoThat's an implementation detail that doesn't make sense in the addressing scheme. Like adding "brick house" to the end of every mailing address when the destination is made of bricks.
- MrVandemar 3y agoWhat about if an mp3 is at the end of a URL? Is that an implementation detail that doesn't make sense? Just take of the .mp3 extension?
- plagiarist 3y agoIf the extension is there because that's what the file is on the server, that's wrong. If the extension is there because the endpoint will return that type of content, I'm fine with it.
- wolrah 3y ago> What about if an mp3 is at the end of a URL? Is that an implementation detail that doesn't make sense? Just take of the .mp3 extension? Yes, why not? Just because file extensions matter to certain systems doesn't mean they do for others, and nothing about a URL to a file is required to match its DOS/Windows friendly file name. > GET /<artistname>/<albumname>/<songname>/download HTTP/1.1 > Host: fakemusicstore.example < HTTP/1.1 200 OK < Content-Type: audio/mpeg < Content-Disposition: attachment; filename="<artistname> - <songname>.mp3"
- hot_gril 3y agoIt's nice in browser history to see foo.mp3 and know it's an mp3.
- wolrah 3y ago> It's nice in browser history to see foo.mp3 and know it's an mp3. TBH I agree, I personally do my best to ensure the extension in the URL matches the document type on sites I run, but my point was that it's not in any way required and it's actually somewhat common for it to not be the case where the person I was replying to seemed to think it mattered.
- patmorgan23 3y agoIs it though? What if the website owner decides that what to make the page more dynamic and switch to PHP?
- Wicher 3y agoThen the page that PHP outputs is still HTML.
- cqqxo4zV46cp 3y agoContent negotiation!