SlideShare a Scribd company logo
Creating Rajinikant
  Powered Site
    Markandey Singh
I am markandey
I am javascript hacker
So lets talk about rajinikant
What is gmail id
       of
 rajinikanth?
gmail @ rajinikanth .com
Creating Rajanikant Powered Site
Rajanikanth smoking in Dubai
recently I saw this site




   http://www.desimartini.com/allaboutrajni.htm
Claims to be working offline.
I loved it!
and hoped they are promoting
          HTML5
But sad they were using FLASH

             :(
Today we are going to
create a site which does the
magic of rajanikant in HTML5
A site which can work offline,
even if your internet unplugged
A site which works no matter
how your laptop is oriented!
and some more magic
DESCLAIMER

All characters and events in this talk -– even
though based on real people –- are entirely
                 fictional.
offline web apps
HTML5 defines some Offline
Application Caching APIs
Which allows you to cache
entire app offline so that your
 app will be fully operational
         even offline
Its very easy to do
Declaration of cache manifest
 <!DOCTYPE html>
 <html manifest="/cache-manifest-file">
 ----
 -----------------
 ---------------------
 ---------------------
Cache manifest file
CACHE MANIFEST




#comment goes here
./anything.js
./anything.css
./anything.png


NETWORK:
*
Cache manifest MIME type
                      has to be
                text/cache-manifest

 PHP
 header('Content-type: text/cache-manifest');


  App Engine
  self.response.headers['Content-Type'] = "text/cache-
manifest"
WARNING
 Once you deploy offline capable
app , none of your files will update to
user, untill you will update your
cache-manifest
How to check
 connectivity??

navigator.onLine
Events??


document.body.addEventListener("offline", function ()
{
    --------
    --------
}, false);

document.body.addEventListener("online", function ()
{
   --------
   --------
}, false);
Canvas
Canvas
Canvas was here for
    long time
in non-IE browsers, and now
  avaialable in IE9 as well
Canvas APIs are simple



var
canvas = document.getElementById('canvas'),
ctx = canvas.getContext('2d');
Canvas APIs are simple

canvas.width=500;
canvas.height=500;
Canvas APIs are simple

ctx.strokeStyle = '#0000FF';
ctx.lineWidth = 1;
Canvas APIs are simple

ctx.beginPath();
ctx.moveTo(x, y);
ctx.lineTo(x, y);


ctx.arc(x,y,radius,startAngle,endAngle, clockwise);


ctx.stroke();
ctx.fill();
DataUrl and Images


 var dataURL = canvas.toDataURL("image/png");



 data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA



 img = new Image();
 img.src=imgurl; //data:image/
png;base64,iVBORw0


 ctx.drawImage(img,0,0);
HTML Local Storage
its a way to store small size data
         on client side.
 (around 15MB per origin in most of the browsers)
Large data on localStorage should
be avoided & too many read/write
should be avoided !! To keep your
           app faster!!
HTML5 Local Storage API


localStorage.setItem('name',value);




value=localStorage.getItem('name');
Other APIs to store data locally are
1.  Indexed Database API
2.  File API
CSS 3D transforms
  (only supported by webkit)
Eventually major mobile
browsers are based on
webkit, e.g. iPhone, Android
etc...
: ro tateY
                 form
      kit- trans
 -web );
(- 11deg
Device orientation
  window.addEventListener('deviceorientation',
function(event) {
    var a = event.alpha,
     b = event.beta,
    g = event.gamma;

 }, false);
Device orientation
Resources and people!!




      @paul_irish            @rem




                            @Codepo8
http://caniuse.com/
Thank you
              &
          Questions!!

twitter: @markandey
email: markandey.singh at gmail

More Related Content

PPT
You Know WebOS
PDF
Desmistificando o Phonegap (Cordova)
PDF
Codemotion Progressive Web Applications Pwa Webinar - Jorge Ferreiro - @jgfer...
PPTX
5 single page application principles developers need to know
PDF
Don't worry be API with Slim framework and Joomla
PDF
Anatomy of a Progressive Web App
PDF
Intro Open Social and Dashboards
PDF
Always on! ... or not?
You Know WebOS
Desmistificando o Phonegap (Cordova)
Codemotion Progressive Web Applications Pwa Webinar - Jorge Ferreiro - @jgfer...
5 single page application principles developers need to know
Don't worry be API with Slim framework and Joomla
Anatomy of a Progressive Web App
Intro Open Social and Dashboards
Always on! ... or not?

What's hot (19)

PPTX
That's crazy! how to build single page web apps
PDF
Pwa is the future. The Presentation I gave at PWA event
PDF
Progressive web apps
PDF
Resume
PPTX
Progressive Web Apps
PPT
Introduction To JavaScript
PDF
Progressive Web App (feat. React, Django)
PDF
Design Web Api
PPTX
Progressive Web Applications - The Next Gen Web Technologies
PPTX
ASP.NEt MVC and Angular What a couple
PPTX
Introduction to Progressive Web Applications
PPTX
Html5 inputs
PDF
FEDM Meetup: Introducing Mojito
PDF
Building Mobile Applications with Ionic
PDF
PWA - The hidden stories about the future of the web
PDF
Creating mobile apps - an introduction to Ionic (Engage 2016)
PPTX
Phone gap
PDF
Progressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
PDF
Ionic: The Web SDK for Develop Mobile Apps.
That's crazy! how to build single page web apps
Pwa is the future. The Presentation I gave at PWA event
Progressive web apps
Resume
Progressive Web Apps
Introduction To JavaScript
Progressive Web App (feat. React, Django)
Design Web Api
Progressive Web Applications - The Next Gen Web Technologies
ASP.NEt MVC and Angular What a couple
Introduction to Progressive Web Applications
Html5 inputs
FEDM Meetup: Introducing Mojito
Building Mobile Applications with Ionic
PWA - The hidden stories about the future of the web
Creating mobile apps - an introduction to Ionic (Engage 2016)
Phone gap
Progressive Web Apps keynote, Google Developer Summit, Tokyo, Japan
Ionic: The Web SDK for Develop Mobile Apps.
Ad

Viewers also liked (11)

PPT
Mrs. Smriti Irani Introduction
PPT
Ppt of amirkhan
PDF
Zero To Hero Sudha Murty
PDF
Mandela 10 Lessons of Life
PPT
Kiran Bedi
PDF
From Hero to Zero - DevOpsDays Boston
PDF
Raj kapoor
PPTX
Presentation Zero to Hero in 9 Steps
PPTX
Salman Khan- PR
PPTX
Kiranbedi
PPTX
Swachh bharat abhiyan
Mrs. Smriti Irani Introduction
Ppt of amirkhan
Zero To Hero Sudha Murty
Mandela 10 Lessons of Life
Kiran Bedi
From Hero to Zero - DevOpsDays Boston
Raj kapoor
Presentation Zero to Hero in 9 Steps
Salman Khan- PR
Kiranbedi
Swachh bharat abhiyan
Ad

Similar to Creating Rajanikant Powered Site (20)

PDF
Building great mobile apps: Somethings you might want to know
PPTX
Taking Web Applications Offline
PPT
HTML 5 Offline Web apps
PDF
your browser, your storage
KEY
HTML5와 모바일
PDF
Html5 and beyond the next generation of mobile web applications - Touch Tou...
PPTX
Dave Orchard - Offline Web Apps with HTML5
PDF
Get Ahead with HTML5 on Moible
PDF
Your browser, your storage (extended version)
PDF
Offline strategies for HTML5 web applications - ConFoo13
PDF
Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...
PDF
Html5 storage suggestions for challenges.pptx
PDF
Offline strategies for HTML5 web applications - frOSCon8
PPTX
Offline Storage
PDF
your browser, my storage
PDF
Offline Strategies for HTML5 Web Applications - ipc13
PPTX
The Power of HTML5 Offline: Mobile and More!
PPTX
High Performance Mobile Web
PDF
Frontend. Global domination.
PDF
Front-end. Global domination
Building great mobile apps: Somethings you might want to know
Taking Web Applications Offline
HTML 5 Offline Web apps
your browser, your storage
HTML5와 모바일
Html5 and beyond the next generation of mobile web applications - Touch Tou...
Dave Orchard - Offline Web Apps with HTML5
Get Ahead with HTML5 on Moible
Your browser, your storage (extended version)
Offline strategies for HTML5 web applications - ConFoo13
Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...
Html5 storage suggestions for challenges.pptx
Offline strategies for HTML5 web applications - frOSCon8
Offline Storage
your browser, my storage
Offline Strategies for HTML5 Web Applications - ipc13
The Power of HTML5 Offline: Mobile and More!
High Performance Mobile Web
Frontend. Global domination.
Front-end. Global domination

More from markandey (6)

PPTX
YQL: Master Of the Mix
PDF
Rhok Dec-2012
PPTX
Select * from internet
PPTX
YQL (IITK PPT)
PPTX
10 things you can't do without YQL
PPTX
10thingsyoucantdowithout yql1
YQL: Master Of the Mix
Rhok Dec-2012
Select * from internet
YQL (IITK PPT)
10 things you can't do without YQL
10thingsyoucantdowithout yql1

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Spectroscopy.pptx food analysis technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
cuic standard and advanced reporting.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
20250228 LYD VKU AI Blended-Learning.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Spectroscopy.pptx food analysis technology
Chapter 3 Spatial Domain Image Processing.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Review of recent advances in non-invasive hemoglobin estimation
cuic standard and advanced reporting.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
MYSQL Presentation for SQL database connectivity
Programs and apps: productivity, graphics, security and other tools
Encapsulation_ Review paper, used for researhc scholars
Network Security Unit 5.pdf for BCA BBA.
Dropbox Q2 2025 Financial Results & Investor Presentation
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Creating Rajanikant Powered Site