SlideShare a Scribd company logo
Client Side Performance
Compromises Worth
Making
Sydney Web Apps Group: 19.9.13
@cathyblabla
What!!?
Good client-side performance really is simple -
smaller files, fewer HTTP requests, less DOM
manipulation. Use YSlow and understand the
rules it is based on.
OK, so there are lots of tricky details that we
could go into, like CSS selector performance,
but is your site huge enough for things like that
to make a difference? Probably not. So….
Where to draw the line
Where do you draw the line between good
performance and maintainability? Class names
like ‘a1’ to make your CSS files smaller? No
way! But there some situations where ‘The
Rules’ can and should be bent...
Multiple sprite images
Sprites allows us to download all our image
assets in one request. If you use Compass, it’s
sprite functionality makes this super simple.
But all those disparate colour palettes add up,
resulting in either a big 32bit PNG or degraded
colour reproduction. The solution? Split up your
sprites into similar colour groups and stick to a
set pallette. It’s a few more HTTP requests but
worth it.

Recommended for you

Ajax
AjaxAjax
Ajax

AJAX is an approach for building fast, dynamic web pages using existing web standards like XML, JavaScript, CSS, and HTML. It allows updated parts of a web page without reloading the entire page. Frameworks help simplify AJAX development by providing pre-built functions and libraries that handle cross-browser compatibility and other complexities. Direct AJAX frameworks require expertise in HTML, CSS, and JavaScript while indirect frameworks use high-level languages and compilers.

 
by Home
ajax framework
Html Templating - DOT JS
Html Templating - DOT JSHtml Templating - DOT JS
Html Templating - DOT JS

This document provides an introduction to HTML templating. It discusses what templates are, common repeating elements in HTML that can be templated, and use cases for templating like menus, cart items, images etc. It compares templating approaches to traditional methods of preparing entire HTML on the server. Popular templating engines like Underscore, Mustache, Handlebars are listed and how templating works by binding templates with data to generate markup is explained. Best practices, challenges and demos of different templating engines are also covered.

dotdotjsdot.js
Web Development basics with WordPress
Web Development basics with WordPressWeb Development basics with WordPress
Web Development basics with WordPress

This document provides an overview of basics in web development including HTML, CSS, JavaScript, and WordPress. It discusses the structure and components of HTML, different HTML elements and tags, CSS syntax and selectors, uses of JavaScript, and an introduction to WordPress including why it is commonly used and the WordPress development process. The document aims to provide foundational knowledge on key web development technologies through explanations, examples, and a quiz.

htmlcssjs
Like this...
$green-sprites: sprite-map("sprites/green/*.png");
$grey-sprites: sprite-map("sprites/grey/*.png");
%mail-icon {
background: sprite($grey-sprites, mail) no-repeat;
&:hover {
background: sprite($green-sprites, mail) no-repeat;
}
}
Scaling images in HTML
Ideally, we would only download images at the
exact size they will be displayed, but your
responsive site will probably call for fluid
images to cater for different devices - what to
do!?
If you can, serve different sized images based
on device categories then allow CSS scaling to
take over.
Choose image sizes that match your target
devices closely and that are close to the upper
end of your breakpoint to minimise image
degradation.
Include the served image’s width and height in
your html to reduce the visible effect of reflows
once your image is loaded.
Load (most) scripts at the bottom of
the page
Inserting scripts at the end of your page stops
script downloads from blocking the rest of your
content. But long pages can result in a
noticeable lag for script effects - while your
overall page load time may be improved the
users’ perception of load time could be
affected.

Recommended for you

The Importance Things of Full Stack Development
The Importance Things of Full Stack DevelopmentThe Importance Things of Full Stack Development
The Importance Things of Full Stack Development

Full Stack web technologies including Node.js, AngularJS and MongoDB Development for fornt End & Back End web & Mobile Application Development. Brainvire's skilled team of developer help you to make your application attractive & effective. For more : http://www.brainvire.com/full-stack-development

node.jswebsitedevelopmentangularjs
Scaling Wordpress
Scaling WordpressScaling Wordpress
Scaling Wordpress

Wordpress is a popular open source content management system (CMS) with many plugins and themes available. The document discusses how a Wordpress Multisite architecture can scale to serve millions of users. It outlines using load balancers, caching, and replicating MySQL and PHP servers to distribute the load across multiple sites and databases for high performance and availability.

lanascalibilitywordpress
Top web development tools
Top web development toolsTop web development tools
Top web development tools

This document discusses top web development tools including Browsersync, Fontello, Bootstrap Studio, and Sass. Browsersync helps with synchronized cross-browser testing. Fontello provides access to icons and fonts that remain intact across screen resolutions. Bootstrap Studio allows building responsive websites using Bootstrap with an easy drag-and-drop interface. Sass is a widely used CSS extension language that provides features like inheritance, variables, and functions to extend CSS capabilities.

top web development tools
...so should I load my scripts in
<head> after all?
One approach is to load your ‘must have’
scripts in the head, then load the rest at the
bottom of the page. While this introduces some
maintenance overhead, your page loads as fast
as possible while also giving your users a
seamless experience.
Script loaders FTW!
RequireJS is a script loader that present a
unique solution to this problem. Out of the box,
RequireJS loads modules asynchronously as
they are called for. There is also an
optimisation tool that provides an automated
build. All the files required for your project are
minified and concatenated, this file is then
loaded asynchronously. Your scripts are
optimised, available earlier and are non-
blocking. Yay!
What about lazy loading?
It is possible to squeeze even more
performance out of your Require scripts by
splitting them up and lazy loading those that
are less often needed. Read about it here.
YUI includes a script loader that is based on
RequireJS but also utilises a server side combo
handler that serves back separate files in one
request. The combo loader is open source and
you can get it here.
Some OO in your SASS
Love the modular approach of OOCSS but don’
t like your HTML getting cluttered up with non
semantic class names? With SASS you have
the tools to write modular, concise code that
can be constructed in any way you wish.
Create a structural hierarchy within your SASS
code and push design complexity back to the
style layer to keep your HTML simple and
readable.

Recommended for you

Web development
Web developmentWeb development
Web development

The document discusses web development and provides an overview of key topics including HTML, CSS, JavaScript, and sample projects. It introduces HTML tags and elements, CSS syntax and types, JavaScript syntax, and provides code examples of simple HTML, CSS, and JavaScript documents. It also outlines three projects: a portfolio site using HTML and CSS, a static website using HTML and CSS, and a dynamic website using HTML, CSS, and JavaScript.

web developmentweb designweb design and development
Introduction to Basic Concepts in Web
Introduction to Basic Concepts in WebIntroduction to Basic Concepts in Web
Introduction to Basic Concepts in Web

The document introduces some basic concepts of web application programming including HTTP, clients and servers, resources, requests and responses. HTTP is a stateless protocol used to transfer information on intranets and the World Wide Web. It defines request and response methods between clients and servers. Clients such as web browsers make HTTP requests to servers, which store and provide resources/files in response. Common resources are accessed via URLs. HTTP requests use methods like GET to retrieve representations of resources. A GET request involves opening a connection, sending the request, and reading the response. Responses contain header information and the requested resource. Standards like HTML, CSS, XML, and JavaScript are used to structure modern web documents and provide inter

Thin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentationThin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentation

The document discusses the future of web technologies with thin-server architectures. It outlines the history of web development from early desktop applications to modern rich internet applications. The thin-server architecture moves more functionality to the client side, making applications more scalable, cacheable, and stateless. Major companies are investing in client-side technologies like Google Web Toolkit, and emerging standards like HTML5 support more intelligent clients.

single page applicationspa
Use placeholders to create re-usable
structures...
%btn {
@include rnd( 3px );
border: 1px solid grey;
cursor: pointer;
line-height: 2.3;
padding: 0 17px;
text-decoration: none;
}
.my-button {
@extend %btn;
color: green;
}
Build up top level rules from
combinations of re-usables
.news-module {
@extend %media-block;
@extend %media-module;
.top-stories {
@extend %stories-list;
}
.more-link {
@extend %btn;
}
}
Mixins give you more flexibility...
@mixin button ($colour: green) {
@include background-image(
linear-gradient(white, $colour)
);
border: 1px solid darken($colour, 40%);
color: 1px solid lighten($colour, 20%);
}
.delete-button {
@include button(red);
}
.active-button {
@include button(blue);
}
But be careful of the final output...
Placeholders generate a single rule with all
selectors combined. If you have too many, IE
goes kaboom!
.btn1, .btn2, .btn { //styles extended from %btn }
Mixin styles are repeated wherever they are
used, so use them minimally, ideally for styles
that are unique (ie, based on a parameter).

Recommended for you

Introduction To Website Development
Introduction To Website DevelopmentIntroduction To Website Development
Introduction To Website Development

Cascading Style Sheets (CSS) allow web developers to define styles that can then be applied to multiple pages, reducing the work of updating styles across a site. Ajax techniques combine tools like JavaScript and XML to improve usability and loading speed for users. Key web technologies include HTML, XML, JavaScript, and server-side languages like PHP and ASP that generate dynamic web pages by connecting to databases through SQL.

design website development
Client side vs server side
Client side vs server sideClient side vs server side
Client side vs server side

Client side technologies like HTML, CSS, and JavaScript run in web browsers to structure and present web pages, while server side technologies like ASP.NET, C#, and VB.NET run on web servers to develop web applications and convert server controls to HTML elements before sending responses to browsers.

Web 2.0
Web 2.0Web 2.0
Web 2.0

Web 2.0 refers to second-generation Internet-based services that emphasize online collaboration and sharing among users. It is characterized by technologies like web applications, social networking sites, web feeds, wikis, and folksonomies. Key aspects include user-generated content, rich user interfaces, and APIs that allow data sharing between sites and applications. Technologies like Ajax and JavaScript frameworks allow sites to function more like desktop applications by asynchronously updating parts of a web page without reloading the entire page.

.delete-button {
background-image(
linear-gradient(white, red)
);
border: 1px solid #660000;
color: 1px solid #FFBFBF;
}
.active-button {
background-image(
linear-gradient(white, blue)
);
border: 1px solid #000066;
color: 1px solid #99CCFF;
}

More Related Content

What's hot

Introduction to Web Development
Introduction to Web DevelopmentIntroduction to Web Development
Introduction to Web Development
Parvez Mahbub
 
Asp.net introduction
Asp.net introductionAsp.net introduction
Asp.net introduction
Kshitij Wagle
 
Ajax
AjaxAjax
Ajax
AjaxAjax
Ajax
Home
 
Html Templating - DOT JS
Html Templating - DOT JSHtml Templating - DOT JS
Html Templating - DOT JS
Nagaraju Sangam
 
Web Development basics with WordPress
Web Development basics with WordPressWeb Development basics with WordPress
Web Development basics with WordPress
Rashna Maharjan
 
The Importance Things of Full Stack Development
The Importance Things of Full Stack DevelopmentThe Importance Things of Full Stack Development
The Importance Things of Full Stack Development
Mike Taylor
 
Scaling Wordpress
Scaling WordpressScaling Wordpress
Scaling Wordpress
ngonpham
 
Top web development tools
Top web development toolsTop web development tools
Top web development tools
BusinessDevelopment35
 
Web development
Web developmentWeb development
Web development
GarvitBaleshwar
 
Introduction to Basic Concepts in Web
Introduction to Basic Concepts in WebIntroduction to Basic Concepts in Web
Introduction to Basic Concepts in Web
Jussi Pohjolainen
 
Thin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentationThin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentation
David Amend
 
Introduction To Website Development
Introduction To Website DevelopmentIntroduction To Website Development
Introduction To Website Development
zaidfarooqui974
 
Client side vs server side
Client side vs server sideClient side vs server side
Client side vs server side
abgjim96
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
TSUBHASHRI
 
Thin Server Architecture
Thin Server ArchitectureThin Server Architecture
Thin Server Architecture
Mitch Pirtle
 
Web development classes in pune
Web development classes in puneWeb development classes in pune
Web development classes in pune
Nidhi Samdani
 
Web deveplopment courses in pune
Web deveplopment courses  in puneWeb deveplopment courses  in pune
Web deveplopment courses in pune
Nidhi Samdani
 

What's hot (18)

Introduction to Web Development
Introduction to Web DevelopmentIntroduction to Web Development
Introduction to Web Development
 
Asp.net introduction
Asp.net introductionAsp.net introduction
Asp.net introduction
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
Html Templating - DOT JS
Html Templating - DOT JSHtml Templating - DOT JS
Html Templating - DOT JS
 
Web Development basics with WordPress
Web Development basics with WordPressWeb Development basics with WordPress
Web Development basics with WordPress
 
The Importance Things of Full Stack Development
The Importance Things of Full Stack DevelopmentThe Importance Things of Full Stack Development
The Importance Things of Full Stack Development
 
Scaling Wordpress
Scaling WordpressScaling Wordpress
Scaling Wordpress
 
Top web development tools
Top web development toolsTop web development tools
Top web development tools
 
Web development
Web developmentWeb development
Web development
 
Introduction to Basic Concepts in Web
Introduction to Basic Concepts in WebIntroduction to Basic Concepts in Web
Introduction to Basic Concepts in Web
 
Thin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentationThin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentation
 
Introduction To Website Development
Introduction To Website DevelopmentIntroduction To Website Development
Introduction To Website Development
 
Client side vs server side
Client side vs server sideClient side vs server side
Client side vs server side
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
 
Thin Server Architecture
Thin Server ArchitectureThin Server Architecture
Thin Server Architecture
 
Web development classes in pune
Web development classes in puneWeb development classes in pune
Web development classes in pune
 
Web deveplopment courses in pune
Web deveplopment courses  in puneWeb deveplopment courses  in pune
Web deveplopment courses in pune
 

Similar to Client side performance compromises worth making

Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
Andolasoft Inc
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
Nilesh Bafna
 
Presentation about html5 css3
Presentation about html5 css3Presentation about html5 css3
Presentation about html5 css3
Gopi A
 
WEB DEVELOPMENT
WEB DEVELOPMENTWEB DEVELOPMENT
Websites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly WebsitesWebsites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly Websites
websiteunlimited
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
Sachin Walvekar
 
Modern ux-workflow-presentation
Modern ux-workflow-presentationModern ux-workflow-presentation
Modern ux-workflow-presentation
Brian Akpa
 
Asp.Net Tips
Asp.Net TipsAsp.Net Tips
Asp.Net Tips
Susan Begonja
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
zonathen
 
Bootstrap for Beginners
Bootstrap for BeginnersBootstrap for Beginners
Bootstrap for Beginners
D'arce Hess
 
CSS3 and a brief introduction to Google Maps API v3
CSS3 and a brief introduction to Google Maps API v3 CSS3 and a brief introduction to Google Maps API v3
CSS3 and a brief introduction to Google Maps API v3
Jeffrey Barke
 
Static site best practices
Static site best practicesStatic site best practices
Static site best practices
Allanki Srinivas
 
NodeJs Frameworks.pdf
NodeJs Frameworks.pdfNodeJs Frameworks.pdf
NodeJs Frameworks.pdf
WPWeb Infotech
 
Website Performance at Client Level
Website Performance at Client LevelWebsite Performance at Client Level
Website Performance at Client Level
Constantin Stan
 
ashish ppt webd.pptx
ashish ppt webd.pptxashish ppt webd.pptx
ashish ppt webd.pptx
ashishsaini773461
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
David Lindkvist
 
What is LessCSS and its Detailed Explation - Xhtmlchop
What is LessCSS and its Detailed Explation - XhtmlchopWhat is LessCSS and its Detailed Explation - Xhtmlchop
What is LessCSS and its Detailed Explation - Xhtmlchop
xhtmlchop
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)
Folio3 Software
 
An Introduction to CSS Frameworks
An Introduction to CSS FrameworksAn Introduction to CSS Frameworks
An Introduction to CSS Frameworks
Adrian Westlake
 
Top Front-End Frameworks For Your Web Development Projects.pdf
Top Front-End Frameworks For Your Web Development Projects.pdfTop Front-End Frameworks For Your Web Development Projects.pdf
Top Front-End Frameworks For Your Web Development Projects.pdf
CalvinLee106
 

Similar to Client side performance compromises worth making (20)

Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
Presentation about html5 css3
Presentation about html5 css3Presentation about html5 css3
Presentation about html5 css3
 
WEB DEVELOPMENT
WEB DEVELOPMENTWEB DEVELOPMENT
WEB DEVELOPMENT
 
Websites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly WebsitesWebsites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly Websites
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 
Modern ux-workflow-presentation
Modern ux-workflow-presentationModern ux-workflow-presentation
Modern ux-workflow-presentation
 
Asp.Net Tips
Asp.Net TipsAsp.Net Tips
Asp.Net Tips
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
Bootstrap for Beginners
Bootstrap for BeginnersBootstrap for Beginners
Bootstrap for Beginners
 
CSS3 and a brief introduction to Google Maps API v3
CSS3 and a brief introduction to Google Maps API v3 CSS3 and a brief introduction to Google Maps API v3
CSS3 and a brief introduction to Google Maps API v3
 
Static site best practices
Static site best practicesStatic site best practices
Static site best practices
 
NodeJs Frameworks.pdf
NodeJs Frameworks.pdfNodeJs Frameworks.pdf
NodeJs Frameworks.pdf
 
Website Performance at Client Level
Website Performance at Client LevelWebsite Performance at Client Level
Website Performance at Client Level
 
ashish ppt webd.pptx
ashish ppt webd.pptxashish ppt webd.pptx
ashish ppt webd.pptx
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
What is LessCSS and its Detailed Explation - Xhtmlchop
What is LessCSS and its Detailed Explation - XhtmlchopWhat is LessCSS and its Detailed Explation - Xhtmlchop
What is LessCSS and its Detailed Explation - Xhtmlchop
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)
 
An Introduction to CSS Frameworks
An Introduction to CSS FrameworksAn Introduction to CSS Frameworks
An Introduction to CSS Frameworks
 
Top Front-End Frameworks For Your Web Development Projects.pdf
Top Front-End Frameworks For Your Web Development Projects.pdfTop Front-End Frameworks For Your Web Development Projects.pdf
Top Front-End Frameworks For Your Web Development Projects.pdf
 

Recently uploaded

Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
welrejdoall
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
Lidia A.
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Erasmo Purificato
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
Sally Laouacheria
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
Larry Smarr
 

Recently uploaded (20)

Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
 

Client side performance compromises worth making

  • 1. Client Side Performance Compromises Worth Making Sydney Web Apps Group: 19.9.13 @cathyblabla
  • 2. What!!? Good client-side performance really is simple - smaller files, fewer HTTP requests, less DOM manipulation. Use YSlow and understand the rules it is based on. OK, so there are lots of tricky details that we could go into, like CSS selector performance, but is your site huge enough for things like that to make a difference? Probably not. So….
  • 3. Where to draw the line Where do you draw the line between good performance and maintainability? Class names like ‘a1’ to make your CSS files smaller? No way! But there some situations where ‘The Rules’ can and should be bent...
  • 4. Multiple sprite images Sprites allows us to download all our image assets in one request. If you use Compass, it’s sprite functionality makes this super simple. But all those disparate colour palettes add up, resulting in either a big 32bit PNG or degraded colour reproduction. The solution? Split up your sprites into similar colour groups and stick to a set pallette. It’s a few more HTTP requests but worth it.
  • 5. Like this... $green-sprites: sprite-map("sprites/green/*.png"); $grey-sprites: sprite-map("sprites/grey/*.png"); %mail-icon { background: sprite($grey-sprites, mail) no-repeat; &:hover { background: sprite($green-sprites, mail) no-repeat; } }
  • 6. Scaling images in HTML Ideally, we would only download images at the exact size they will be displayed, but your responsive site will probably call for fluid images to cater for different devices - what to do!? If you can, serve different sized images based on device categories then allow CSS scaling to take over.
  • 7. Choose image sizes that match your target devices closely and that are close to the upper end of your breakpoint to minimise image degradation. Include the served image’s width and height in your html to reduce the visible effect of reflows once your image is loaded.
  • 8. Load (most) scripts at the bottom of the page Inserting scripts at the end of your page stops script downloads from blocking the rest of your content. But long pages can result in a noticeable lag for script effects - while your overall page load time may be improved the users’ perception of load time could be affected.
  • 9. ...so should I load my scripts in <head> after all? One approach is to load your ‘must have’ scripts in the head, then load the rest at the bottom of the page. While this introduces some maintenance overhead, your page loads as fast as possible while also giving your users a seamless experience.
  • 10. Script loaders FTW! RequireJS is a script loader that present a unique solution to this problem. Out of the box, RequireJS loads modules asynchronously as they are called for. There is also an optimisation tool that provides an automated build. All the files required for your project are minified and concatenated, this file is then loaded asynchronously. Your scripts are optimised, available earlier and are non- blocking. Yay!
  • 11. What about lazy loading? It is possible to squeeze even more performance out of your Require scripts by splitting them up and lazy loading those that are less often needed. Read about it here. YUI includes a script loader that is based on RequireJS but also utilises a server side combo handler that serves back separate files in one request. The combo loader is open source and you can get it here.
  • 12. Some OO in your SASS Love the modular approach of OOCSS but don’ t like your HTML getting cluttered up with non semantic class names? With SASS you have the tools to write modular, concise code that can be constructed in any way you wish. Create a structural hierarchy within your SASS code and push design complexity back to the style layer to keep your HTML simple and readable.
  • 13. Use placeholders to create re-usable structures... %btn { @include rnd( 3px ); border: 1px solid grey; cursor: pointer; line-height: 2.3; padding: 0 17px; text-decoration: none; } .my-button { @extend %btn; color: green; }
  • 14. Build up top level rules from combinations of re-usables .news-module { @extend %media-block; @extend %media-module; .top-stories { @extend %stories-list; } .more-link { @extend %btn; } }
  • 15. Mixins give you more flexibility... @mixin button ($colour: green) { @include background-image( linear-gradient(white, $colour) ); border: 1px solid darken($colour, 40%); color: 1px solid lighten($colour, 20%); } .delete-button { @include button(red); } .active-button { @include button(blue); }
  • 16. But be careful of the final output... Placeholders generate a single rule with all selectors combined. If you have too many, IE goes kaboom! .btn1, .btn2, .btn { //styles extended from %btn } Mixin styles are repeated wherever they are used, so use them minimally, ideally for styles that are unique (ie, based on a parameter).
  • 17. .delete-button { background-image( linear-gradient(white, red) ); border: 1px solid #660000; color: 1px solid #FFBFBF; } .active-button { background-image( linear-gradient(white, blue) ); border: 1px solid #000066; color: 1px solid #99CCFF; }