You've probably noticed that we use Wowhead to embed item, spell, talent, and quest tooltips in articles here, and some of you use the same functionality on your own blogs. Wowhead's codeslinger Skosiris has made a change in the way this is handled, and that change necessitates a small update in the code needed to produce those tooltips. All you have to do is change the line "<script src="http://www.wowhead.com/widgets/power.js"></script>" to "<script src="http://www.wowhead.com/widgets/power.js?lol"></script>" wherever you have it in your code; this will force the users to reload the JavaScript so they're not running an out-of-date version.If your own site is not powered by Wowhead, but would like it to be, it's as easy as adding "<script src="http://www.wowhead.com/widgets/power.js?lol"></script>" anywhere in your page code. If you do that, all relevant links pointing to Wowhead will get tooltips. Nifty, eh?














Reader Comments (Page 1 of 2)
4-30-2008 @ 12:08PM
Naix said...
Too bad I got java script disabled. I can't afford to lose my account.
Reply
4-30-2008 @ 6:07PM
RogueJedi86 said...
Wowhead will never steal your account.
I've been web browsing with all scripts enabled for years(adblock aside), and my account hasn't been stolen in the 1 1/2 years I've been playing. Just enable the wowhead script. It saves having to manually click over to wowhead from wowinsider.
5-01-2008 @ 10:48AM
Dan said...
That mostly just gives you a false sense of security, have you uninstalled your pdf reader as well? If you haven't updated Acrobat reader in 6-12 months (or so) your computer can be hacked by a malicious pdf link, no need to use javascript for that. If you haven't updated IE6 since you installed it you can get hacked by looking at an image. Etc, etc.
Your much more likely to be hacked by using an addon auto updater than having javascript enabled in your browser, javascript security holes are a problem for *all* users on the web, so they get patched rather quickly once found, whereas auto updaters for addons are specifically used by WoW users, so you have less people that can find the security holes, and theres a bigger chance that you loose your account if they aren't found and patched in time.
You can also look at it from the hackers point of view, which is easier, to exploit a javascript bug that means they have to find a hole Microsoft or the Firefox team has missed, even though they work extensively with security. Or try to hack a single website (all they need is to find the password for the webserver) and upload a hacked autoupdater.
TL;DR: Always update your webbrowsers, your operative systems and any addins to your browsers (such as acrobat reader). Don't use auto updaters for your addons. And of course, try to be smart about what you install and from where you get it.
4-30-2008 @ 12:15PM
xzigraz said...
I don't get it.
You asked us to change the old code to
but then you ask people who would like to add it to their website to use
which is the old code...
Reply
4-30-2008 @ 12:25PM
drht said...
Appending the little "?lol" to the script makes browsers to download the .js again, and not use the cached one...
If i ever start a blog, i'll surely use it!
4-30-2008 @ 12:17PM
Taeous said...
Awesome, thanks for posting this. I always wondered how they did that.
Reply
4-30-2008 @ 12:19PM
xzigraz said...
huh, can't put code in it? Here it is again
You asked us to change the old code to
"http://www.wowhead.com/widgets/power.js?lol"
but then you ask people who would like to add it to their website to use
"http://www.wowhead.com/widgets/power.js"
which is the old code...
Reply
4-30-2008 @ 12:22PM
Eliah Hecht said...
Ah, typo on my part. Put the new code (with "?lol") on your site.
4-30-2008 @ 12:38PM
inexodus said...
The "?lol" only forces your users to update their cached copy of the script. It doesn't have any impact on the actual javascript file delivered from the server. So if you've been using their tooltips and you think your users might have the script cached, put "?lol" (or really "?whatever") at the end to trick the browser into getting the newest version. But if you've never used the Wowhead tooltips on your site before and you're pretty sure your visitors won't have the script cached from another site (remember it's coming from wowhead.com, not from your server) then you can just use the normal URL.
Either way, once the cached version expires from their browsers in a few days they'll all get the newest version anyway.
5-01-2008 @ 7:05AM
jrb said...
this is all smells of bullsh*t to me, especially since the main 'wowhead powered' site doesn't even tell you to do it.
caching of content, or refreshing of cached items is handled by the browser (yes, i know you can force content not to be cached in code, when the browser is set to fetch items from the cache if they exist there), so surely a better place to set it would be in the actual code link everyone is already using without a LaughOutLoud parameter, or ask people to check their browser settings.
5-01-2008 @ 10:55AM
Dan said...
@jrb, that would mean they had the foresight of doing it right from the start, if they didn't and told all webbrowsers that it's alright to keep a copy until the year 2999 and that they don't need to check with the server, then that's what the webbrowsers will do.
On that note, if your on a webpage that used to show those "tooltips", and it isn't anymore, you can hit Ctrl + F5 to force your webbrowser to fetch the javascript (and everything else on that webpage) fresh from the server.
4-30-2008 @ 12:22PM
synack said...
What changed exactly? Care to link us to an announcement or posting of some sort? Thanks.
Reply
4-30-2008 @ 12:24PM
Eliah Hecht said...
Skosiris didn't actually tell me what the change is that makes this necessary, but I can tell you what the "?lol" does. It forces the user to reload the JavaScript file, in case they have the old version of the script cached; something in the old version is no longer compatible with the Wowhead database. We could just wait for the users' caches to expire, but this is quicker and will reduce errors.
4-30-2008 @ 12:33PM
Zala said...
Now why would i use an extra 22 bits of my already VERY limited storagespace?
Just kidding. I love that script, and thanks for the headsup
Reply
4-30-2008 @ 12:43PM
alektraunic said...
you are using their (wowheads) bandwidth, not your storage space. the js file is loaded from their server
4-30-2008 @ 1:47PM
Aichon said...
@ alektraunic: And then it gets cached locally, hence the problem mentioned in the article and the extra storage space. :P
4-30-2008 @ 3:31PM
Zala said...
Oh i know its storaged at them...
But "?lol" consists of 4 symbols. Together thats 22 bits :)
Its nothing, I was just joking
4-30-2008 @ 4:28PM
Charlie said...
How could you not tell that he was joking?
4-30-2008 @ 12:44PM
pb said...
if you use firefox and greasemonkey, I've created a small userscript that does this for you
http://userscripts.org/scripts/show/16762
any website you add as an include (via the greasemonkey Manage User Scripts dialog) will make it powered by Wowhead friendly for any wowhead links found on that site. I've added the us and eu forums by default.
Reply
4-30-2008 @ 1:15PM
Eliah Hecht said...
Thanks! This looks handy.