KBD

Keith Devens .com

Sunday, October 12, 2008 Flag waving
Less isn't more; just enough is more. – Milton Glaser
← Comment RSS feedsGreat quote →

Daily link icon Saturday, June 14, 2003

Time Since

I think I like Simon's new time since feature (you can't see it unless you go to the home page). I think I've seen similar things elsewhere but I can't remember where. It might be a little distracting on his home page since it's kind of big. But, thanks to his girlfriend Natalie for making the code available. If I can find a place to put it I may use it.

Hey, she uses the exact same type of URL scheme I do. Score.

The only reason I think the time since may not be the best idea is because it has to change every time the page loads, as opposed to the time of a post which is static. This would seriously hurt static caching. However, Simon's point that it erases the time zone distinction is a really good one. But because of the caching issue alone I don't think I'd want to use it.

My whole philosophy while developing my CMS has been that even if some things are more inefficient than they would be without the CMS, it's more important to make things easy to use, because whatever inefficiencies there are can be completely eliminated by having pages cached and served from static files.

← Comment RSS feedsGreat quote →

Comments XML gif

Simon Willison (http://simon.incutio.com/) wrote:

Yup the static caching thing caught me out soon after I installed it - I've had to knock the timeout on the front page down from 5 minutes to 1 minute to keep the time since thing updating properly.

If caching is an issue, a nice alternative is to generate the time_since information using javascript. With careful use of the DOM you can get the time since bit to appear in browsers that support the DOM and be silently skipped in older browsers, which isn't a problem as it's not an essntial part of the page. Hixie does this on http://ln.hixie.ch/ using some pretty funky Mozilla specific stuff.

∴ Simon Willison | 14-Jun-2003 11:30pm est | http://simon.incutio.com/ | #2193

Keith (http://www.keithdevens.com/) wrote:

Awesome, I'll check that out. I considered Javascript too. I've been sour on the whole client-side scripting thing in general, and especially fed up with the whole thing when I found out that you have to write to the browser in a completely different way if the page is XHTML. That was in an article by Mark Pilgrim on xml.com, I think, but I can't find it in my weblog archive.

Keith | 14-Jun-2003 11:56pm est | http://www.keithdevens.com/ | #2194

Simon Willison (http://simon.incutio.com/) wrote:

Hehe tell me about it - when I switched my site to being served with application/xhtml ALL of my scripts stopped working on the spot! I figured out the solution the other day - you need to switch to using document.createElementNS in Mozilla but keep using document.createElement in IE. I've got a function to do just that in my blockquotes code now: http://simon.incutio.com/blockquotesNS.js

∴ Simon Willison | 15-Jun-2003 6:24am est | http://simon.incutio.com/ | #2195

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

October 2008
SunMonTueWedThuFriSat
 1234
567891011
12131415161718
19202122232425
262728293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 7 posts

Recent comments XML

I hate PHP

Elliot Anderson,

Dude!! You the​man! The reverse replacement for​array_u...

Alex Ndungu: Oct 11, 1:35am

Call a function from a string in Python

?!code:
some_object.__getattribute​__('method_name')()
?!/code

is​the s...

Patrick Corcoran: Oct 8, 3:53pm

Spider solitaire

I have won 185 games of Spider​Solitaire at the "Difficult" level.​ What is...

75.179.28.113: Oct 8, 12:42pm

Sed one-liners

Hi.

I wanted to let you know​that I wrote an article "Famous Sed​One-Lin...

Peteris Krumins: Oct 8, 3:05am

Timesheet Calculator

Hadn't seen it before now, but my​company already uses a time​tracking prog...

Keith: Oct 7, 10:44am

Girls, please don't get breast implants

Hey everyone, 

I am new to this​blog and I have enjoyed reading all​your...

Sarah.M.: Oct 6, 9:45am

Generated in about 0.164s.

(Used 8 db queries)

mobile phone