4 ms·
wh... what extension do you use now then
by veidr 3y ago
wh... what extension do you use now then
- deleted 3y ago[deleted]
- watermelon0 3y ago.htm is another option, but AFAIK it went out of fashion a long time ago.
- ForkMeOnTinder 3y agoWhen I first started doing web dev, everyone was using ".htm". But I haven't seen that used since the 20th century.
- Karellen 3y agoI prefer not using an extension. That way if I change my site infrastructure from, e.g. static html, to php, to mediawiki, to cgi-bin, to asp, to ruby on rails, all my URLs can stay the same (because cool URLs don't change) throughout, without containing misleading legacy baggage.
- joemi 3y agoIsn't this something you can just configure at the server level, so you don't need to have your files be extensionless? I could swear I've done that before in apache.
- Karellen 3y ago> Isn't this something you can just configure at the server level Oh, yeah. I mean, you have to configure the server to treat extensionless files as html/cgi/php/whatever anyway, so you could just have it load extensionless URLs from .html/.cgi/.php files, but I prefer to keep my server config as "surprise-free" as possible. If `/article/foo` is served from the file `$DOCUMENT_ROOT/article/foo` on the filesystem, I find that less confusing for everyone than if it's served from `$DOCUMENT_ROOT/article/foo.php`. It's a matter of personal preference, for sure. Just like `.htm` over `.html`. (Or `.jpg` over `.jpeg` for that matter.) I wouldn't say the way I do it is "right", but it's a trade-off that works for me.
- vallode 3y agoI guess I'll add to the pile of thoughts by saying that I think the parent comment was making a snide remark about .jsx/.tsx files, i.e "no one writes HTML anymore"
- duxup 3y agoI edited my post, my bad :(