Relative timestamp

Contributor
Joined
Jan 18, 2018
Messages
1,139
I wonder if it would be possible to make the timestamp near chapters of manga be a relative one. Kinda like this.
biWl6Zm.png

I mean, in the sense that the 21 minutes ago part self-updates. The site from the picture does (though it's a very minimalistic one, in good spirit). Or are there some wonky issues that would make this a drain in the server?

EDIT: I just noticed that the title is kind of misleading, I apologize. I meant making the timestamp self-updating, since it's already relative.
 
Dex-chan lover
Joined
Nov 20, 2018
Messages
5,865
@kenx

This could be implemented with client-side JavaScript. What would have to be sent to the visitor would be an absolute time-stamp, and code for computing the difference between that absolute time-stamp and current time.

That said, I think that client-side script should never be used without very compelling reason. JavaScript is a recurring source of security problems, so that requiring your visitors to have JavaScript enabled is basically like requiring those visitors to leave their computers open to attack. And many clients are already drowning from the demand for resources because so many jackasses in polo shirts think “That shit is kewl!” when it comes to JavaScript.
 
Member
Joined
Jan 24, 2018
Messages
150
^Invalid argument, the internet is basically unusable with JS disabled lol
also you could make a <noscript> with the time in a typical format (like now, but that would needlessly stress the server with most users, or just UTC time written like in hover)
A valid one would be performance. Counting 50 timestamps on a website might slow down the loading or even scrolling if you have a crappy internet terminal device.
 
Active member
Joined
Jun 21, 2018
Messages
223
@kenx
Before talking about cons, you should be thinking about the pros, and I don't know, feels like it idoesn't provide anything worthwhile to warrant the logistics in implementing it.
 
Dex-chan lover
Joined
Nov 20, 2018
Messages
5,865
@Jendrej
the internet is basically unusable with JS disabled lol
Rubbish. MagaDex is currently amongst many sites that are quite usable without JavaScript enabled.
you could make a <noscript> with the time in a typical format
Quite true. If the coders make proper use of NOSCRIPT elements, then the site will degrade gracefully where JavaScript is concerned.
Counting 50 timestamps on a website might slow down the loading or even scrolling if you have a crappy internet terminal device.
As I said:
many clients are already drowning from the demand for resources
Whether all such devices are “crappy” hangs upon how one defines that term.
 

Users who are viewing this thread

Top