jQuery PJAX - The McDev Blog

disgustedtukwilaInternet and Web Development

Dec 14, 2013 (3 years and 9 months ago)

152 views

S

jQuery

PJAX

Speeding up the Client


Kevin
McKelvin



Devs4Devs


13 August 2011

Blog:
http://mcdev.za.net

Twitter:
@
kmckelvin

Email:
kmckelvin@gmail.com

this.Speaker.ToString
();

S
Kevin
McKelvin

S
C#, Ruby, JavaScript developer

S
Blog: http://mcdev.za.net

S
Twitter: @
kmckelvin

S
Email: kmckelvin@gmail.com

S

The Interactive Web

The First Evolution

S
AJAX

S
Partial Refreshes

S
#!


Interactive Web (AJAX)

$.ajax({


url: url,


data:
{id: 1},


success:
function(data)



{ ... },


dataType: ‘html’

});

The Problems

S
Permalinks

S
Unpredictable Back Button

S
#! In URLs

S
window.location.hash

The Solution

pushState

+ AJAX = PJAX


PJAX

S
Bookmarkable

Permanent Links

S
Fully degradable in unsupported browsers

S
Supported in major browsers

S
Firefox 4+

S
Safari 5+

S
Chrome 8+

S
Android 2.2+

S
Opera 11.5+

Sample


Static Content

Resources

S
jQuery
:
http://jquery.com

S
jQuery

PJAX plugin:

http://github.com/defunkt/jquery
-
pjax

S
The
McDev

Blog:

http://mcdev.za.net


More JavaScript

S
Backbone.js

http
://documentcloud.github.com/backbone
/

S
Node.js (Asynchronous Servers in JavaScript)

http://nodejs.org
/

S
Schalk

Neethling



“Watcher” @ 11:30 in Room 1

S
Martin Cronje


“RIA the way it was supposed to be”


Next in Room 2