Amandasaurus
Amandasaurus

Reputation: 60709

Link to the exact line of a plain text file without using html

Let's say I have a plain text file (the log file output of a programme say) hosted on a website. We link to that file. People open it in their browser. Is there some way to link to an extact line in that file? similar to the http://www.example.com/file.html#name URL scheme? The trick is that this file cannot easily be converted to HTML, so I'm looking for a way to do it with URLs (to go in a <a href=... code).

I am pretty sure this isn't in any HTML spec (even though it's not a HTML file). I'm just looking for a hack. The only browsers that will be used are Firefox & Chrome/Chromium. A little unsupported feature hack of those browsers will do fine.

Upvotes: 3

Views: 792

Answers (1)

FreeAsInBeer
FreeAsInBeer

Reputation: 12979

In order to use hashtags, you would have to use HTML in your text file. You could create some sort of wrapper page that would read that text file in, beautify it and allow much better user interaction.

Upvotes: 1

Related Questions