JavaScript is a scripting language most often used for client-side web development. JavaScript is a dynamic, weakly typed, prototype-based language with first-class functions. JavaScript was influenced by many languages and was designed to have a similar look to Java, but be easier for non-programmers to work with. The language is best known for its use in websites (as client-side JavaScript), but is also used to enable scripting access to objects embedded in other applications.

Disqus 2012 Default Sort Order Fix

disqus default sort orderIf you are using Disqus on your site, you will see that annoyingly the default sort order for listing comments is 'best'.

I have implemented disqus on many sites and the number 1 request I get is to change the default sort order to newest.

There is no documentation or hints anywhere to solve this. So I solved it.

Javascript Snippet to Add HTML, CSS, and FEED Validation Links

Here's an example of validation links from the AskApache footer.

RSS | XHTML 1.1 | CSS 2.1

document.getElementById("validat").innerHTML += ' | <a href="">RSS</a>  | <a href=";outline=1;sp=1;debug">XHTML 1.1</a> | <a href="">CSS 2.1</a>';

Adding YouTube Videos To Website, 4 Methods

This is the advanced example. It uses the jw flv player to create a flash proxy. This basically lets me control the youtube video as if it were a local .f4v file. With this method I can specify any options, autostart, volume, playlists, etc.. But it's rather complex so lets start with 3 other methods to embed YouTube video.

Serve External Javascript Files locally for Increased Speed

One way I speed up is by downloading external third-party javascript files to host on my own server instead of externally. In addition to the obvious speed boost, this lets you configure the caching and compression settings for the files.

Referer Spoofing Using JavaScript

pseudo-flaw.netEven though at the moment I'm more into AJAX and simple behavioural unobtrusive javascript more than java, I still remember how excited I was back in 1995 when Sun released both beta and alpha Java versions to the public.. In fact I still have my Java 1.0 Unleashed book, which I'm looking at right now.