Jump to content

Decoding Hints


BigWhiteTruck

Recommended Posts

Wouldn't it be easier to have the user's browser decode the hint on a cache page instead of re-downloading the whole page when they click on "decode this hint". It would reduce load on the server, and be easy to implement, using javascript or dhtml. It would also make for a more pleasant user experience, not having to wait for the page to reload, then scroll down.

Link to comment

The suggestion has been made before.

 

It doesn't have to be done with popups (ugh) An example of how it could work with DHTML is (and no comments on the example content - it's just a page I happened to have open that employs this technique) can be seen at:

 

http://lab.msdn.microsoft.com/express/faq/...lt.aspx#visualc

 

I could probably even be convinced to provide the dozen lines of code it would take to make it go...

Link to comment

OK, it's not quite trivial if you really wanted to keep log and hint encryption lockstepped. ("Show all logs" probably does make sense to force a page reload since you don't WANT to ship that data in most cases and is thus a different problem.)

 

A totally underachieving 90 second implementation might look like this:

http://www.mtgc.org/tmp/xxx/xxx.html

 

Yeah, it's cut and pasted from BigWhiteTrucks example and is dumb as a box of rocks in that it requires three copies of the hint, the label doesn't "toggle" nicely, it doesn't examine the incoming argument list to set initial state, etc.. Since I don't natively speak JS/DHTML, writing a "real" decoder in it might take as much as a couple of minutes and fixing these other things probably a few dozen more minutes. So it's a little more complicated, but still easily on the "after a few beers" side of brain surgery. :-)

 

I don't know what percentage of the pages the site serves up only to immediately serve up the "decode=y" version for the hint, If it's an interesting number, this approach is one worth considering as it could reduce that number.

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...