News for hackers. Stuff that matters.
Re:A Reflection on the Small Web by sodimel on Thursday September 29, 2022 @11:12AM (#33021822)
(this txt file is not an html element, it's lighter than a traditional webpage because of my poor connection and the fact that I'm self-hosting my website)
Re:A Reflection on the Small Web by t_mann on Thursday September 29, 2022 @11:18AM (#33021917)
ok, but wouldn't the tags still be resolved by browsers, even if they're not wrapped inside <html>? or is the point that it's not meant to be viewed through a browser? the overhead of the tags in terms of bytes seems fairly negligible, no?
Re:A Reflection on the Small Web by perilunar on Thursday September 29, 2022 @11:45AM (#33022301)
HTML tags will be recognised by browsers even if the file is not wrapped with an <html> tag, but only if the file is served as html.

As I mentioned in a comment above, wrap the plain text in <pre></pre> tags, serve as html, then you can use links without adding any other html at all.

Re:A Reflection on the Small Web by t_mann on Thursday September 29, 2022 @11:48AM (#33022342)
right - just removing .txt at the end should be enough even
Re:A Reflection on the Small Web by sodimel on Thursday September 29, 2022 @11:27AM (#33022020)
I think tags would not be recognized by browsers. I just select the link (triple click) and right click > open link in new tab.
Re:A Reflection on the Small Web by t_mann on Thursday September 29, 2022 @11:45AM (#33022294)
Yeah you're right, I just tested it on my site. Before I just tried it in Codepen, but I forgot that it autowraps everything inside <html> and <body>, haha