Archive

Posts Tagged ‘javascript’

jQuery 1.4 released!

January 15th, 2010 No comments

What a way to start the weekend, jQuery 1.4 has been released! There’s so much ubber goodness in this release I nearly fell of my chair! I have yet to muse about but most definately worth a look, the performance boosts are insane!

{lang: 'en-GB'}
Share

QuickFix: jQuery $.getJSON() fails in IE6 & IE7

October 27th, 2009 15 comments

Had a nasty issue with jQuery + jSON + IEx just now – still at work because of it!

This bit of code works perfectly fine on Firefox and Chrome:

function onUnitsModified() {
            $.getJSON("<%=Url.Action("GetTotalUnitCount", "ProjectReaper")%>", null, function(result) {
                if(result > 0)
                  // Do stuffs here
                }
            });
            return true;
}

But in IE we’ve come to realise that the first hit is successful, future json requests ones are not hitting the ASP.NET MVC actions (I put a breakpoint). You could append a time stamp to get rid of this annoying caching bug, but alternatively you can use the ajaxSetup options to disable caching.

function onUnitsModified() {
            $.ajaxSetup ({ cache: false}); 
            $.getJSON("<%=Url.Action("GetTotalUnitCount", "ProjectReaper")%>", null, function(result) {
                if(result > 0)
                  // Do stuffs here
                }
            });
            return true;
}

Darnit! Hope someone else doesn’t waste their time trying to fix this now 🙂

{lang: 'en-GB'}
Share

Foxy ladies: Mozilla releases Firefox 3.5!

July 1st, 2009 No comments

The moment we’ve all been waiting for, Mozilla has released the final version of Firefox 3.5 (which was originally slated to be 3.1). Amongst the highlights include the new Gecko 1.9.1 rendering engine and (from their release notes):

  • Available in more than 70 languages. (Get your local version!)
  • Support for the HTML5 <video> and <audio> elements including native support for Ogg Theora encoded video and Vorbis encoded audio. (Try it here!)
  • Improved tools for controlling your private data, including a Private Browsing Mode.
  • Better web application performance using the new TraceMonkey JavaScript engine.
  • The ability to share your location with websites using Location Aware Browsing. (Try it here!)
  • Support for native JSON, and web worker threads.
  • Improvements to the Gecko layout engine, including speculative parsing for faster content rendering.
  • Support for new web technologies such as: downloadable fonts, CSS media queries, new transformations and properties, JavaScript query selectors, HTML5 local storage and offline application storage, <canvas> text, ICC profiles, and SVG transforms.

For the developers, the Mozilla developer centre details the changes in this release. But the most exciting is the support for <video> and <audio> elements from the HTML 5 draft and the inclusion of the TraceMonkey JavaScript engine.

Download it now!

{lang: 'en-GB'}
Share

Hot Pants: The Google Chrome Experiment to make you high

March 21st, 2009 2 comments

It seems the latest craze in the browser market (apart from Internet Explorer) is All About The Benjamins Javascript Engines. We have Google Chrome’s V8, Fruity Safari’s Nitro, WebKit have their own Squirrel Fish Extreme which will eventually power Safari 4, Firefox’s TraceMonkey and Opera’s Futhark. The past several months there have been numerous performance tests and  stats on pure Javascript performance across these platforms.

But now, Google has released The Chrome Experiment. Essentially a showcase of the ‘cooler’ things you can do with Javascript on the browser. Checkout the Browser Ball demo or the awesome Amiga Workbench Emulator (reminds me of Omar‘s old home page that emulated Windows 2000), the rest of the demos are equally impressive.

We think JavaScript is awesome. We also think browsers are awesome. Indeed, when we talk about them, we say they are the cat’s meow – which is an American expression meaning AWESOME.

In light of these deeply held beliefs, we created this site to showcase cool experiments for both JavaScript and web browsers.

These experiments were created by designers and programmers from around the world. Their work is making the web faster, more fun, and more open – the same spirit in which we built Google Chrome.

Awesomeness indeed.

{lang: 'en-GB'}
Share

Google Chrome 2.0

January 9th, 2009 1 comment

While Microsoft flaunts Windows 7, everyone’s second favourite company, Google is hard at work on Chrome 2.0. They’ve just release a pre-beta release tagged Chrome 2.0.156.1 which brings some funky new changes:

  • New version of WebKit. WebKit is the open source code Google Chrome uses to render web pages (HTML and CSS). 1.0.154.36 used basically the same version of WebKit as Safari 3.1, but the WebKit team has made a lot of improvements since that was released. 156.1 uses WebKit version 528.8 or, more precisely, revision 39410 from the WebKit source tree. In addition to fixing bugs and enabling features like full-page zoom and autoscroll, the new version also enables some nifty CSS features:
  • Form Autocomplete. Google Chrome remembers what you’ve typed into fields on web pages. If you type in the same form again, it will show any previous values that match what you’ve typed so far. You can disable Form autocomplete on the Minor Tweaks tab of the Options dialog.  (Note: this is like the basic form autocomplete available in Firefox or Internet Explorer. It is not the same as the form fill feature in Google Toolbar.)
  • Full-page zoom. Previously, page zoom (Ctrl++ or Ctrl+-) increased or decreased only the text on a page. Zoom now scales everything on the page together, so pages look correct at different zoom levels.
  • Spell-checking improvements. You can now enable or disable spell checking in a text field by right-clicking in the field. You can also change the spell-checking language by right clicking. To enable spell-checking in a language, add it to the list of ‘languages you use to read web sites’ in the Fonts and Languages dialog ([Wrench] > Options > Minor Tweaks > Fonts and Languages). Note that Google Chrome doesn’t have spell-checking dictionaries for every language you can add to this list.
  • Autoscroll. Many users have asked for this and (thanks to our WebKit update), we now offer autoscrolling. Middle-click (click the mousewheel on most mice) on a page to turn on autoscroll, then move the mouse to scroll the page in any direction.
  • Docking dragged tabs. When you drag a tab to certain positions on the monitor, a docking icon will appear.  Release the mouse over the docking icon to have the tab snap to the docking position instead of being dropped at the same size as the original window. Docking positions are:
    • Monitor top: make the dropped tab maximized.
    • Monitor left/right: make the dropped tab full-height and half-width, aligned with the monitor edge.
    • Monitor bottom: make the dropped tab full-width and half-height, aligned with the bottom of the monitor.
    • Browser-window left/right: fit the browser window and the dropped tab side-by-side across the screen.
    • Browser-window bottom: fit the browser window and the dropped tab top-to-bottom across the screen.
  • Import bookmarks from Google Bookmarks. The [Wrench menu] > Import bookmarks & settings… option now has a Google Toolbar option to import Google Bookmarks. The bookmarks get imported into your Other bookmarks folder. The bookmarks are not kept in sync; the import process simply reads in the current set of online bookmarks.
  • New SafeBrowsing implementation. SafeBrowsing is now faster, more reliable, and uses the disk less often.
  • Use different browser profiles. You can start a new browser window that uses a different profile (different bookmarks, history, cookies, etc.). Use [Wrench menu] > New window in profile. When you create a new profile, you can name it and add a shortcut to your Desktop.
  • Update the V8 Javascript engine to version 0.4.6.0 (from 0.3.9.3).
  • New network code. Google Chrome now has its own implementation of the HTTP network protocol (we were using the WinHTTP library on Windows, but need common code for Mac and Linux). We fixed a few bugs in HTTP authentication and made Google Chrome more compatible with servers that reply with invalid HTTP responses. We need feedback on anything that’s currently broken, particularly with proxy servers, secure (https) sites, and sites that require log in.
  • New window frames on Windows XP and Vista, supporting windows cascading and tiling, and other window-management add-in programs.
  • Experimental user script support (similar to Greasemonkey). You can add a –enable-user-scripts flag to your Google Chrome shortcut to enable user scripts. See the developer documentation for details.
  • A new HTTPS-only browsing mode. Add –force-https to your Google Chrome shortcut, and it will only load HTTPS sites. Sites with SSL certificate errors will not load.

Go on, try it out.

{lang: 'en-GB'}
Share

Microsoft will support JQuery in the future!!!

September 29th, 2008 No comments

Mondays are always a drag, the weekends over, you have a full 5 days to get through before the next weekend – a steep contrast to my uni days, when all hope was pinned on waiting for the end of semester.

Yesterday Scott Guthrie posted some very exciting news about Microsoft supporting the JQuery project in the future.

I’m excited today to announce that Microsoft will be shipping jQuery with Visual Studio going forward.  We will distribute the jQuery JavaScript library as-is, and will not be forking or changing the source from the main jQuery branch.  The files will continue to use and ship under the existing jQuery MIT license.

We will also distribute intellisense-annotated versions that provide great Visual Studio intellisense and help-integration at design-time.

This is huge news and a very welcome suprise – especially for a Monday.

But wait, theres more:

Going forward we’ll use jQuery as one of the libraries used to implement higher-level controls in the ASP.NET AJAX Control Toolkit, as well as to implement new Ajax server-side helper methods for ASP.NET MVC.  New features we add to ASP.NET AJAX (like the new client template support) will be designed to integrate nicely with jQuery as well.

Can things get any better?

We also plan to contribute tests, bug fixes, and patches back to the jQuery open source project.  These will all go through the standard jQuery patch review process.

Turns out to be a not so bad Monday after all, now if we could just work on the traffic around Melbourne.

{lang: 'en-GB'}
Share

Determining Gender based on browsing history.

July 29th, 2008 No comments

An interesting bit-o-javascript posted by Mike-On-Ads that exploits an age old trick of leaking out the browsers navigated history. Armed with the info a cunning developer can workout what gender the viewer is.

The blog posting on the site explains the method used and allows you to try it out. Give it a ago and see how accurate it is 🙂

Here are my results:

Likelihood of you being FEMALE is 34%
Likelihood of you being MALE is 66%

Site Male-Female Ratio
slashdot.org 1.74
theage.com.au 1.13

Damn, I knew I shouldnt be browsing SlashDot that much, atleast it wasnt Cosmopolitan or Womens Weekly (ooops!). Unfortunately, only my current session records the history as I clear my page history when firefox closes. I’ll have to try it again and see if it changes.

{lang: 'en-GB'}
Share