SlideShare ist ein Scribd-Unternehmen logo
1 von 52
BEST FRIENDS
- They make our site more
HTML CSS JavaScript
Images source Xbox.com
Build prefect site with CSS,
JS and HTML
Images source Xbox.com
Here is the Website ;)
Images source Xbox.com
HTML : Help to show content in browsers
CSS : Help to style the content
JS : Help to interact with content
What is in Next Slides? (about HTML5)
• What and Why HTML5
• New Elements
• New Attributes
• Storage
• Offline
• What's good and bad
What is in Next Slides? (about CSS3)
• Background
• Animations
• Media query
What is in Next Slides? (about JS)
• Web workers
• Web socket
What is HTML5?
• It’s not just next version of HTML
• Make web more powerful
• Easy for developers and computer program
“HTML5 was proposed by Opera Software and Mozilla Foundation in June,2004”- WWW
Why HTML5?
“Web developers be proud, what we wrote will run in any device*”- Evol
*Conditions apply ;)
OLD HTML
Access to the local system's
resources/GPU 
Works in Offline 
Heavy graphics and quality UI 
So, we need to depend on plugins (Like Flash and Silverlight)
Why HTML5?
“Web developers be proud, what we wrote will run in any device*”- Evol
*Conditions apply ;)
OLD HTML HTML5
Access to the local system's
resources/GPU  
Works in Offline  
Heavy graphics and quality UI  
So, we need to depend on plugins (Like Flash and Silverlight)
So, it comes with..
Graphics
Location
Database
Speed
Audio
Video
Offline
Basic HTML5 structure
<header>
<nav>
<footer>
<section>
<section>
<article>
<article>
<aside>
New Elements
• <canvas> and <svg>
• <video> and <audio>
• New Form inputs
• Datalist
“HTML5 could do everything Flash did”- Steve Jobs
Canvas and SVG
Canvas (scriptable image tag) SVG
HTML:
<canvas id="myCanvas" width="200" height="100">
Your browser does not support the HTML5 canvas tag.
</canvas>
JavaScript:
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.fillStyle="#FF0000";
ctx.fillRect(0,0,200,100);
Output :
HTML:
<svg width="400" height="110">
<rect width=“200" height="100"
style="fill:rgb(255,0,0); ">
Sorry, your browser does not support inline SVG.
</svg>
JavaScript:
//For now need any action
Output :
WHEN<canvas>
<svg>
…Please use web to get more content about topic.
“In this world there are 30+ browsers”- WWW
<Video>
• Help to add video to our site.
• HTML :
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
<source src="movie.webm" type="video/webm">
Your browser does not support the video tag.
</video>
http://www.w3schools.com/tags/tag_video.asp
Video file format V/S Browser
http:/www.w3schools.com/html/html5_video.asp and http://www.w3.org/2010/05/video/mediaevents.html
MP4 WebM OGG
  
  
  
  
  
<audio>
• Help to add audio to our site.
• HTML :
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
<source src="horse.wav" type="audio/wav">
Your browser does not support the audio element.
</audio> http://www.w3schools.com/tags/tag_audio.asp
“The first web browser was called WorldWideWeb (Nexus), invented in 1990 -
1991 and had 4 million users.”- WWW
Audio file format V/S Browser
MP3 Wav OGG
  
  
  
  
  
New Form inputs
New Form inputs
<datalist>
• This tag specifies a list of pre-defined options for an <input> element.
• HTML :
<input list="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
Demo : http://www.w3schools.com/TAgs/tag_datalist.asp
New Attributes
• autocomplete
• autofocus
• pattern (regexp)
• placeholder
• required
Demo : http://www.w3schools.com/html/html5_form_attributes.asp
and http://www.w3schools.com/tags/ref_eventattributes.asp
“Custom attributes use data- prefix. E.g. :- data-SOMETHING”
Local Storage
• window.localStorage - stores data with no expiration date
• code.sessionStorage - stores data for one session (data is lost when the tab
is closed)
• JavaScript:
if(typeof(Storage)!=="undefined")
{
// Code for localStorage/sessionStorage.
}
else
{
// Sorry! No Web Storage support..
}
Local Storage
• window.localStorage - stores data with no expiration date
• code.sessionStorage - stores data for one session (data is lost when the tab
is closed)
• JavaScript:
if(typeof(Storage)!=="undefined") //('localStorage' in window && window['localStorage'] !== null)
{
localStorage.setItem("lastname", "Smith");
sessionStorage.clickcount = Number(sessionStorage.clickcount) + 1;
}
else
{
// Sorry! No Web Storage support..
}
Local Storage
• Web SQL Database works in Safari, Chrome and Opera (!IE and !FF)
• JavaScript:
openDatabase('documents', '1.0', 'Local document storage', 5*1024*1024,
function (db) {
db.changeVersion('', '1.0', function (t) {
t.executeSql('CREATE TABLE docids (id, name)');
}, error);
});
• IndexDB -- https://dvcs.w3.org/hg/IndexedDB/raw-
file/tip/Overview.html
Local Storage
Offline
• Offline browsing
• Speed
• Reduced server load
• HTML:
<!DOCTYPE HTML>
<html>
<body>
The content of the document......
</body>
</html>
Offline
• Offline browsing
• Speed
• Reduced server load
• HTML:
<!DOCTYPE HTML>
<html manifest="demo.appcache">
<body>
The content of the document......
</body>
</html>
Offline - Manifest File
CACHE MANIFEST
# v1.0 – Update by Harish
/theme.css
/logo.gif
/main.js
NETWORK:
login.asp
FALLBACK:
/html/ /offline.html
Offline - Updating the cache triggers
• The user clears the browser's cache
• The manifest file is modified
• The application cache is programmatically updated
Demo : http://www.bennadel.com/blog/2029-using-html5-offline-
application-cache-events-in-javascript.htm and
www.htmlgoodies.com/html5/tutorials/introduction-to-offline-web-
applications-using-html5.html
2012 2013 2014 2015 2016
HTML 5.0 Candidate Rec Call for Review Recommendation
HTML 5.1
1st Working
Draft
Last Call Candidate Rec Recommendation
HTML 5.2
1st Working
Draft
- Wiki
What's good and bad?
“Betting on HTML5 was a mistake”- Mark Zuckenberg
“We have definity shifted from HTML5 to native”- LinkedIn
…Please use web to get more content about topic.
What is CSS?
According to me,
“If HTML is Girl…
What is CSS?
…CSS is her makeup kit ”
Background
• Multiple Background Images
• Background origin
• Background size
• Background clip
Demo http://www.w3schools.com/css/css3_backgrounds.asp
A B
X Y
Animations will help us for better user experience (UX)
Animations
• animation: myfirst 5s; /*@keyframe name and time delay (s/ms) */
• We can also set timing function, delay, iteration count, direction
• About @Keyframe rule is “where the animation is created”.
• CSS:
Demo http://www.w3schools.com/css/css3_animations.asp
@keyframes myfirst
{
from {background: red;}
to {background: yellow;}
}
@keyframes myfirst
{
0% {background: red;}
25% {background: yellow;}
50% {background: blue;}
100% {background: green;}
}
CSS Hacks
Property
@keyframes 10.0 4.0 -webkit-
16.0
5.0 -moz-
4.0 -webkit-
15.0 -webkit-
12.1
12.0 -o-
animation 10.0 4.0 -webkit-
16.0
5.0 -moz-
4.0 -webkit-
15.0 -webkit-
12.1
12.0 -o-
• Opacity, in IE 8 or older -- filter:Alpha(opacity=50);
• Web fonts allow to use font that are not installed on the end user
computer.
• Google is providing free fonts
e.g. : http://fonts.googleapis.com/css?family=Butterfly+Kids:400
• CSS:
Custom fonts
@font-face
{
font-family: myFont;
src: url(sansation_light.woff);
}
Demo : http://www.w3schools.com/css/css3_fonts.asp
Media query
• The @media rule allows different style rules for different media in the
same style sheet.
• CSS:
Demo http://www.w3schools.com/css/css_mediatypes.asp
@media screen { /* …. */ }
@media print { /* …. */ }
@media screen,print { /* …. */ }
Media query
• We can even apply different styles based on device
• width and height
• Orientation
• Aspect ratio / Pixel ratio
• CSS:
Demo http://www.w3schools.com/css/css_mediatypes.asp
@media only screen and (max-device-
width: 480px) { /* …. For mobile device
less than 480 px width*/ }
@media only screen and (min-device-
width: 768px) and (max-device-width:
1024px) { /* styles for iPad */ }
CSS ready frameworks
• Twitter bootstrap
http://getbootstrap.com/
• jQuery mobile
http://jquerymobile.com/
• Foundation
http://foundation.zurb.com/
• jQuery UI
http://jqueryui.com/
JavaScript
According to me,
“Without JavaScript our site will be lifeless ”
JavaScript – Two new things
• Web workers
• Web socket
“2% or less disable JavaScript support”- Yahoo
Web workers
Web workers
• A web worker is a JavaScript that runs in the background,
independently of other scripts, without affecting the performance of
the page. You can continue to do whatever you want: clicking,
selecting things, etc., while the web worker runs in the background.
Web workers
• A web worker is a JavaScript that runs in the background,
independently of other scripts, without affecting the performance of
the page. You can continue to do whatever you want: clicking,
selecting things, etc., while the web worker runs in the background.
Demo : http://www.w3schools.com/html/html5_webworkers.asp and
Mozilla link
// in demo_workers.js
var i = 0;
onmessage = function (oEvent) {
timedCount();
postMessage("Hi " + oEvent.data);
};
function timedCount()
{
i = i + 1;
postMessage(i);
setTimeout("timedCount()",500);
}
if(typeof(w) == "undefined" && typeof(Worker) !== "undefined")
{
w = new Worker("demo_workers.js");
}
w.onmessage = function(event){
document.getElementById("result").innerHTML = event.data;
};
function stopWorker() { w.terminate(); }
w. postMessage(“Started”);
Web socket
• WebSocket is a protocol providing full-duplex communications
channels over a single TCP connection.
• That makes it possible to open an interactive communication session
between the user's browser and a server.
Socket : http://docs.oracle.com/javase/tutorial/networking/sockets/definition.html
Web socket - Example
if ("WebSocket" in window)
{
var ws = new WebSocket("ws://localhost:9998/echo");
ws.onopen = function()
{
ws.send("Message to send");
alert("Message is sent...");
};
ws.onmessage = function (evt)
{
var received_msg = evt.data;
alert("Message is received...");
};
ws.onclose = function() {alert("Connection is closed..."); };
}
Demo http://www.tutorialspoint.com/html5/html5_websocket.htm and
https://www.youtube.com/watch?v=Z897fkPn7Rw
NAGA HARISH M
Software engineer
E: nagaharish.movva@gmail.com
W: www.shareourideas.com
facebook.com/shareourideas twitter.com/nagaharishmovva

Weitere ähnliche Inhalte

Was ist angesagt?

An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptFahim Abdullah
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAPJeanie Arnoco
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basicsEliran Eliassy
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS PresentationShawn Calvert
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to JavascriptAmit Tyagi
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arraysHassan Dar
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media QueriesRuss Weakley
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignZoe Gillenwater
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginnersSingsys Pte Ltd
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object ModelWebStackAcademy
 
HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)Daniel Friedman
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScriptAndres Baravalle
 
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - ObjectsWebStackAcademy
 

Was ist angesagt? (20)

An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAP
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
3. Java Script
3. Java Script3. Java Script
3. Java Script
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arrays
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 
jQuery
jQueryjQuery
jQuery
 
jQuery
jQueryjQuery
jQuery
 
Java script
Java scriptJava script
Java script
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
 
Html
HtmlHtml
Html
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - Objects
 
Java script
Java scriptJava script
Java script
 

Andere mochten auch

Modular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopModular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopShay Howe
 
Smartphone - The life changer
Smartphone - The life changerSmartphone - The life changer
Smartphone - The life changerNaga Harish M
 
Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Joseph Lewis
 
HTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryHTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryFAKHRUN NISHA
 
Tutorial: Html5 And Css3 Site
Tutorial: Html5 And Css3 SiteTutorial: Html5 And Css3 Site
Tutorial: Html5 And Css3 SiteAdam Stewart
 
Web Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScriptWeb Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScriptEdureka!
 
HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTMLSun Technlogies
 
Google Analytics 가이드 (한국어)
Google Analytics 가이드 (한국어)Google Analytics 가이드 (한국어)
Google Analytics 가이드 (한국어)Min Hee Lee
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsSun Technlogies
 
4. html css-java script-basics
4. html css-java script-basics4. html css-java script-basics
4. html css-java script-basicsMinea Chem
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTMLMayaLisa
 

Andere mochten auch (19)

Modular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopModular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS Workshop
 
Smartphone - The life changer
Smartphone - The life changerSmartphone - The life changer
Smartphone - The life changer
 
Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)
 
Web designing
Web designingWeb designing
Web designing
 
Css ppt
Css pptCss ppt
Css ppt
 
HTML/CSS/java Script/Jquery
HTML/CSS/java Script/JqueryHTML/CSS/java Script/Jquery
HTML/CSS/java Script/Jquery
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Tutorial: Html5 And Css3 Site
Tutorial: Html5 And Css3 SiteTutorial: Html5 And Css3 Site
Tutorial: Html5 And Css3 Site
 
Web Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScriptWeb Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScript
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTML
 
Google Analytics 가이드 (한국어)
Google Analytics 가이드 (한국어)Google Analytics 가이드 (한국어)
Google Analytics 가이드 (한국어)
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
 
Up to Speed on HTML 5 and CSS 3
Up to Speed on HTML 5 and CSS 3Up to Speed on HTML 5 and CSS 3
Up to Speed on HTML 5 and CSS 3
 
Html Ppt
Html PptHtml Ppt
Html Ppt
 
4. html css-java script-basics
4. html css-java script-basics4. html css-java script-basics
4. html css-java script-basics
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Html5 CSS3 jQuery Basic
Html5 CSS3 jQuery BasicHtml5 CSS3 jQuery Basic
Html5 CSS3 jQuery Basic
 

Ähnlich wie About Best friends - HTML, CSS and JS

HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An OverviewNagendra Um
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesVitaly Friedman
 
JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3Helder da Rocha
 
It's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking ModernizrIt's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking ModernizrMichael Enslow
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewDiacode
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Gill Cleeren
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.GaziAhsan
 
Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Doris Chen
 
CSS3: Are you experienced?
CSS3: Are you experienced?CSS3: Are you experienced?
CSS3: Are you experienced?Denise Jacobs
 
New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5Jamshid Hashimi
 
HTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack DayHTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack DayTed Drake
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Librarieselliando dias
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]David Wesst
 

Ähnlich wie About Best friends - HTML, CSS and JS (20)

HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3
 
It's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking ModernizrIt's a Mod World - A Practical Guide to Rocking Modernizr
It's a Mod World - A Practical Guide to Rocking Modernizr
 
Html5 more than just html5 v final
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v final
 
HTML5, the new buzzword
HTML5, the new buzzwordHTML5, the new buzzword
HTML5, the new buzzword
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overview
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.
 
Rwd slidedeck
Rwd slidedeckRwd slidedeck
Rwd slidedeck
 
HTML5: Introduction
HTML5: IntroductionHTML5: Introduction
HTML5: Introduction
 
Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016
 
Html5
Html5Html5
Html5
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
CSS3: Are you experienced?
CSS3: Are you experienced?CSS3: Are you experienced?
CSS3: Are you experienced?
 
New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5
 
HTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack DayHTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack Day
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
Html5 public
Html5 publicHtml5 public
Html5 public
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
 

Mehr von Naga Harish M

Css few small tips and information
Css few small tips and informationCss few small tips and information
Css few small tips and informationNaga Harish M
 
How to Avoid app store rejection
How to Avoid app store rejectionHow to Avoid app store rejection
How to Avoid app store rejectionNaga Harish M
 
Make app more visible in App store or marketplace
Make app more visible in App store or marketplaceMake app more visible in App store or marketplace
Make app more visible in App store or marketplaceNaga Harish M
 
iOS Distribution and App store pushing and more
iOS Distribution and App store pushing and moreiOS Distribution and App store pushing and more
iOS Distribution and App store pushing and moreNaga Harish M
 
Native vs cross platform vs html5
Native vs cross platform vs html5Native vs cross platform vs html5
Native vs cross platform vs html5Naga Harish M
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titaniumNaga Harish M
 
Mobile website --- Web is in pocket....
Mobile website --- Web is in pocket....Mobile website --- Web is in pocket....
Mobile website --- Web is in pocket....Naga Harish M
 
HTML5 - Let’s make the WEB more powerful
HTML5 - Let’s make the WEB more powerfulHTML5 - Let’s make the WEB more powerful
HTML5 - Let’s make the WEB more powerfulNaga Harish M
 
Naming standards and basic rules in .net coding
Naming standards and basic rules in .net codingNaming standards and basic rules in .net coding
Naming standards and basic rules in .net codingNaga Harish M
 
Developers role in web site seo optimization
Developers role in web site seo optimizationDevelopers role in web site seo optimization
Developers role in web site seo optimizationNaga Harish M
 
Windows presentation foundation
Windows presentation foundationWindows presentation foundation
Windows presentation foundationNaga Harish M
 

Mehr von Naga Harish M (14)

Css few small tips and information
Css few small tips and informationCss few small tips and information
Css few small tips and information
 
How to Avoid app store rejection
How to Avoid app store rejectionHow to Avoid app store rejection
How to Avoid app store rejection
 
Make app more visible in App store or marketplace
Make app more visible in App store or marketplaceMake app more visible in App store or marketplace
Make app more visible in App store or marketplace
 
iOS Distribution and App store pushing and more
iOS Distribution and App store pushing and moreiOS Distribution and App store pushing and more
iOS Distribution and App store pushing and more
 
Native vs cross platform vs html5
Native vs cross platform vs html5Native vs cross platform vs html5
Native vs cross platform vs html5
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Windows phone 8
Windows phone 8Windows phone 8
Windows phone 8
 
Mobile website --- Web is in pocket....
Mobile website --- Web is in pocket....Mobile website --- Web is in pocket....
Mobile website --- Web is in pocket....
 
HTML5 - Let’s make the WEB more powerful
HTML5 - Let’s make the WEB more powerfulHTML5 - Let’s make the WEB more powerful
HTML5 - Let’s make the WEB more powerful
 
Naming standards and basic rules in .net coding
Naming standards and basic rules in .net codingNaming standards and basic rules in .net coding
Naming standards and basic rules in .net coding
 
Developers role in web site seo optimization
Developers role in web site seo optimizationDevelopers role in web site seo optimization
Developers role in web site seo optimization
 
Silverlight
SilverlightSilverlight
Silverlight
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Windows presentation foundation
Windows presentation foundationWindows presentation foundation
Windows presentation foundation
 

Kürzlich hochgeladen

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Kürzlich hochgeladen (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

About Best friends - HTML, CSS and JS

  • 1. BEST FRIENDS - They make our site more
  • 2. HTML CSS JavaScript Images source Xbox.com
  • 3. Build prefect site with CSS, JS and HTML Images source Xbox.com
  • 4. Here is the Website ;) Images source Xbox.com HTML : Help to show content in browsers CSS : Help to style the content JS : Help to interact with content
  • 5. What is in Next Slides? (about HTML5) • What and Why HTML5 • New Elements • New Attributes • Storage • Offline • What's good and bad
  • 6. What is in Next Slides? (about CSS3) • Background • Animations • Media query
  • 7. What is in Next Slides? (about JS) • Web workers • Web socket
  • 8. What is HTML5? • It’s not just next version of HTML • Make web more powerful • Easy for developers and computer program “HTML5 was proposed by Opera Software and Mozilla Foundation in June,2004”- WWW
  • 9. Why HTML5? “Web developers be proud, what we wrote will run in any device*”- Evol *Conditions apply ;) OLD HTML Access to the local system's resources/GPU  Works in Offline  Heavy graphics and quality UI  So, we need to depend on plugins (Like Flash and Silverlight)
  • 10. Why HTML5? “Web developers be proud, what we wrote will run in any device*”- Evol *Conditions apply ;) OLD HTML HTML5 Access to the local system's resources/GPU   Works in Offline   Heavy graphics and quality UI   So, we need to depend on plugins (Like Flash and Silverlight)
  • 11. So, it comes with.. Graphics Location Database Speed Audio Video Offline
  • 13. New Elements • <canvas> and <svg> • <video> and <audio> • New Form inputs • Datalist “HTML5 could do everything Flash did”- Steve Jobs
  • 14. Canvas and SVG Canvas (scriptable image tag) SVG HTML: <canvas id="myCanvas" width="200" height="100"> Your browser does not support the HTML5 canvas tag. </canvas> JavaScript: var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.fillStyle="#FF0000"; ctx.fillRect(0,0,200,100); Output : HTML: <svg width="400" height="110"> <rect width=“200" height="100" style="fill:rgb(255,0,0); "> Sorry, your browser does not support inline SVG. </svg> JavaScript: //For now need any action Output :
  • 15. WHEN<canvas> <svg> …Please use web to get more content about topic.
  • 16. “In this world there are 30+ browsers”- WWW <Video> • Help to add video to our site. • HTML : <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> <source src="movie.webm" type="video/webm"> Your browser does not support the video tag. </video> http://www.w3schools.com/tags/tag_video.asp
  • 17. Video file format V/S Browser http:/www.w3schools.com/html/html5_video.asp and http://www.w3.org/2010/05/video/mediaevents.html MP4 WebM OGG               
  • 18. <audio> • Help to add audio to our site. • HTML : <audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> <source src="horse.wav" type="audio/wav"> Your browser does not support the audio element. </audio> http://www.w3schools.com/tags/tag_audio.asp “The first web browser was called WorldWideWeb (Nexus), invented in 1990 - 1991 and had 4 million users.”- WWW
  • 19. Audio file format V/S Browser MP3 Wav OGG               
  • 22. <datalist> • This tag specifies a list of pre-defined options for an <input> element. • HTML : <input list="browsers"> <datalist id="browsers"> <option value="Internet Explorer"> <option value="Firefox"> <option value="Chrome"> <option value="Opera"> <option value="Safari"> </datalist> Demo : http://www.w3schools.com/TAgs/tag_datalist.asp
  • 23. New Attributes • autocomplete • autofocus • pattern (regexp) • placeholder • required Demo : http://www.w3schools.com/html/html5_form_attributes.asp and http://www.w3schools.com/tags/ref_eventattributes.asp “Custom attributes use data- prefix. E.g. :- data-SOMETHING”
  • 24. Local Storage • window.localStorage - stores data with no expiration date • code.sessionStorage - stores data for one session (data is lost when the tab is closed) • JavaScript: if(typeof(Storage)!=="undefined") { // Code for localStorage/sessionStorage. } else { // Sorry! No Web Storage support.. }
  • 25. Local Storage • window.localStorage - stores data with no expiration date • code.sessionStorage - stores data for one session (data is lost when the tab is closed) • JavaScript: if(typeof(Storage)!=="undefined") //('localStorage' in window && window['localStorage'] !== null) { localStorage.setItem("lastname", "Smith"); sessionStorage.clickcount = Number(sessionStorage.clickcount) + 1; } else { // Sorry! No Web Storage support.. }
  • 26. Local Storage • Web SQL Database works in Safari, Chrome and Opera (!IE and !FF) • JavaScript: openDatabase('documents', '1.0', 'Local document storage', 5*1024*1024, function (db) { db.changeVersion('', '1.0', function (t) { t.executeSql('CREATE TABLE docids (id, name)'); }, error); }); • IndexDB -- https://dvcs.w3.org/hg/IndexedDB/raw- file/tip/Overview.html
  • 28. Offline • Offline browsing • Speed • Reduced server load • HTML: <!DOCTYPE HTML> <html> <body> The content of the document...... </body> </html>
  • 29. Offline • Offline browsing • Speed • Reduced server load • HTML: <!DOCTYPE HTML> <html manifest="demo.appcache"> <body> The content of the document...... </body> </html>
  • 30. Offline - Manifest File CACHE MANIFEST # v1.0 – Update by Harish /theme.css /logo.gif /main.js NETWORK: login.asp FALLBACK: /html/ /offline.html
  • 31. Offline - Updating the cache triggers • The user clears the browser's cache • The manifest file is modified • The application cache is programmatically updated Demo : http://www.bennadel.com/blog/2029-using-html5-offline- application-cache-events-in-javascript.htm and www.htmlgoodies.com/html5/tutorials/introduction-to-offline-web- applications-using-html5.html
  • 32. 2012 2013 2014 2015 2016 HTML 5.0 Candidate Rec Call for Review Recommendation HTML 5.1 1st Working Draft Last Call Candidate Rec Recommendation HTML 5.2 1st Working Draft - Wiki
  • 33. What's good and bad? “Betting on HTML5 was a mistake”- Mark Zuckenberg “We have definity shifted from HTML5 to native”- LinkedIn …Please use web to get more content about topic.
  • 34. What is CSS? According to me, “If HTML is Girl…
  • 35. What is CSS? …CSS is her makeup kit ”
  • 36. Background • Multiple Background Images • Background origin • Background size • Background clip Demo http://www.w3schools.com/css/css3_backgrounds.asp
  • 37. A B
  • 38. X Y Animations will help us for better user experience (UX)
  • 39. Animations • animation: myfirst 5s; /*@keyframe name and time delay (s/ms) */ • We can also set timing function, delay, iteration count, direction • About @Keyframe rule is “where the animation is created”. • CSS: Demo http://www.w3schools.com/css/css3_animations.asp @keyframes myfirst { from {background: red;} to {background: yellow;} } @keyframes myfirst { 0% {background: red;} 25% {background: yellow;} 50% {background: blue;} 100% {background: green;} }
  • 40. CSS Hacks Property @keyframes 10.0 4.0 -webkit- 16.0 5.0 -moz- 4.0 -webkit- 15.0 -webkit- 12.1 12.0 -o- animation 10.0 4.0 -webkit- 16.0 5.0 -moz- 4.0 -webkit- 15.0 -webkit- 12.1 12.0 -o- • Opacity, in IE 8 or older -- filter:Alpha(opacity=50);
  • 41. • Web fonts allow to use font that are not installed on the end user computer. • Google is providing free fonts e.g. : http://fonts.googleapis.com/css?family=Butterfly+Kids:400 • CSS: Custom fonts @font-face { font-family: myFont; src: url(sansation_light.woff); } Demo : http://www.w3schools.com/css/css3_fonts.asp
  • 42. Media query • The @media rule allows different style rules for different media in the same style sheet. • CSS: Demo http://www.w3schools.com/css/css_mediatypes.asp @media screen { /* …. */ } @media print { /* …. */ } @media screen,print { /* …. */ }
  • 43. Media query • We can even apply different styles based on device • width and height • Orientation • Aspect ratio / Pixel ratio • CSS: Demo http://www.w3schools.com/css/css_mediatypes.asp @media only screen and (max-device- width: 480px) { /* …. For mobile device less than 480 px width*/ } @media only screen and (min-device- width: 768px) and (max-device-width: 1024px) { /* styles for iPad */ }
  • 44. CSS ready frameworks • Twitter bootstrap http://getbootstrap.com/ • jQuery mobile http://jquerymobile.com/ • Foundation http://foundation.zurb.com/ • jQuery UI http://jqueryui.com/
  • 45. JavaScript According to me, “Without JavaScript our site will be lifeless ”
  • 46. JavaScript – Two new things • Web workers • Web socket “2% or less disable JavaScript support”- Yahoo
  • 48. Web workers • A web worker is a JavaScript that runs in the background, independently of other scripts, without affecting the performance of the page. You can continue to do whatever you want: clicking, selecting things, etc., while the web worker runs in the background.
  • 49. Web workers • A web worker is a JavaScript that runs in the background, independently of other scripts, without affecting the performance of the page. You can continue to do whatever you want: clicking, selecting things, etc., while the web worker runs in the background. Demo : http://www.w3schools.com/html/html5_webworkers.asp and Mozilla link // in demo_workers.js var i = 0; onmessage = function (oEvent) { timedCount(); postMessage("Hi " + oEvent.data); }; function timedCount() { i = i + 1; postMessage(i); setTimeout("timedCount()",500); } if(typeof(w) == "undefined" && typeof(Worker) !== "undefined") { w = new Worker("demo_workers.js"); } w.onmessage = function(event){ document.getElementById("result").innerHTML = event.data; }; function stopWorker() { w.terminate(); } w. postMessage(“Started”);
  • 50. Web socket • WebSocket is a protocol providing full-duplex communications channels over a single TCP connection. • That makes it possible to open an interactive communication session between the user's browser and a server. Socket : http://docs.oracle.com/javase/tutorial/networking/sockets/definition.html
  • 51. Web socket - Example if ("WebSocket" in window) { var ws = new WebSocket("ws://localhost:9998/echo"); ws.onopen = function() { ws.send("Message to send"); alert("Message is sent..."); }; ws.onmessage = function (evt) { var received_msg = evt.data; alert("Message is received..."); }; ws.onclose = function() {alert("Connection is closed..."); }; } Demo http://www.tutorialspoint.com/html5/html5_websocket.htm and https://www.youtube.com/watch?v=Z897fkPn7Rw
  • 52. NAGA HARISH M Software engineer E: nagaharish.movva@gmail.com W: www.shareourideas.com facebook.com/shareourideas twitter.com/nagaharishmovva