The presentation covers the following points:
1) How to check the legitimacy of a website?
2) How to view a website in different screen sizes?
3) How to find what font or color a website is using?
4) How to detect the font of a text present inside an image?
5) How to take a full/custom screenshot and annotate it?
6) How to determine the development quality a website?
7) How to speed up a website?
8) How to optimize code for optimal website performance?
9) How to quickly make a static <div> based design responsive?
Top Rated Pune Call Girls Daund โ 6297143586 โ Call Me For Genuine Sex Servi...
ย
9 Useful Things that Every Web Developer Needs to Know
1. 9 Useful Things That Every Web
Developer Needs to Know
Presented by:
Nadeem Khan
nadeem.khan@arkhitech.com
2. 1. How to check the legitimacy of a
website?
โ
Alexa Rank/Compete Rank
โ
Google Page Rank
โ
No. of Indexed Pages on Google
โ
Moz Rank
โ
Dmoz listing
โ
Domain Age/Expiration
โ
Web of Trust Ranking
โ
โ
Note: Social Media fan base has nothing to do with legitimacy of a
website. Many scam websites have thousands of fake fans on
Facebook, Twitter, Google+ etc.
โ
3. How to check the legitimacy of a website?
(contโd)
โ
Use Webrank SEO for traffic ranks and Google Page Rank
(Alexa Rank below 25,000 and PR 3+ is good)
โ
Google this โsite:exampledomain.comโ and note the
number of pages indexed (higher is better)
โ
For Moz Rank install Moz Bar extension (Moz Rank of 4+ is
good)
โ
Manually check whether site is listed on Dmoz or not
(Dmoz only accepts quality and one of a kind websites)
โ
Manually check Domain Age (3-4 years is normally good)
and Domain Expiration (2-4 years is normally good) via
http://whois.domaintools.com/
โ
Green WOT Rank indicates safe website (Webrank SEO
extension shows WOT Rank also)
4. 2. How to view a website in different
screen sizes?
โ
Testing a responsive web design in different screen sizes is
really a hectic task
โ
Say hello to Viewport-Resizer
โ
Experimental browser tool available at
http://lab.maltewassermann.com/viewport-resizer/
5. How to view a website in different
screen sizes? (contโd)
โ
Custom view port size and auto animations are extremely
hand features of Viewport-Resizer
6. 3. How to find what font or color a website
is using?
โ
Colorzilla browser extension makes it a breeze to detect
the color of any element present on a page
โ
Whatfont browser extension makes it a breeze to detect
the font of any text present on a page
7. 4. How to detect the font of a text
present inside an image?
โ
This is a very tricky thing but the community present at
http://www.myfonts.com/ is really good and quick about
it.
โ
You just need to upload the image and the community
members there will identify the font within hours (its
absolutely free).
8. 5. How to take a full/custom screenshot
and annotate it?
โ
There are various browser extensions that can take
screenshots but nothing can come close to what
โAwesome Screenshot: Capture and Annotateโ
extension provides.
โ
You can take full page, custom selected area
screenshots and then can crop, annotate and
label them easily.
9. 6. How to determine the development
quality a website?
โข Apart from the basic w3c HTML and CSS
validations, these tools are extremely handy:
โข
โ
http://gtmetrix.com/ (shows both YSlow and
Pagespeed reports)
โ
http://media4x.com/test/
โ
http://tools.pingdom.com/
โ
http://developers.google.com/speed/pagespeed/in
sights/
โ
10. 7. How to speed up a website?
โ
Use a CDN (e.g. MaxCDN and CloudFlare)
โ
Leverage browser caching
โ
HTML, CSS and JS Minification
โ
Enable compression
โ
Optimize and Scale Images
โ
Combine CSS and JavaScript
โ
Defer the parsing of JavaScript
โ
Lazy Load all Images (e.g. jQuery Lazy Load)
โ
Serve images from a different server
โ
Use CSS Image Sprites ()
โ
Choose web hosting wisely
โ
โ
โ
โ
11. 7a. CDN
โข A Content Delivery Network serves content (usually static content like
images and JavaScript) to end users from alternative servers that are
geographically closer to the users.
13. 7c. HTML, CSS and JS Minification
โ
Use YSlow or Page Speed to detect resources that need
minification
โ
Then minify CSS with 'yuicompressor' OR
http://cssminifier.com/
โ
And JavaScript with 'yuicompressor' OR
http://javascript-minifier.com/
โ
โ
โ
Note: Minification is nothing but removal of extra white
space, newlines, comments and tabs etc
14. 7d. Image Optimization and Scaling
โ
Use .jpg over .gif and .png whenever possible
โ
Use Smush.it or RIOT to optimize images
โ
Don't resize images in CSS or HTML and only serve scaled
images
โ
Use RIOT or Photoshop to resize images
โ
Define and fill the 'alt' attribute in all images (mandatory in
HTML5)
โ
Use CSS over image whenever possible (mostly while
defining backgrounds)
15. 7f. Lazy Load Images
โ Lazy load all images below the fold using any of the
many JS libraries
16. 7g. Serve Images from a different
server
โ
Many browsers only allocate two sockets to downloading assets from a single
host. So, if index.html is downloaded from www.domain.com and it
references 6 image files, 3 javascript files, and 3 CSS files (all on
www.domain.com), the browser will download them 2 at a time, with the
other blocking until a socket is free.
โ
Serve images from a sub-domain or a different server to enable parallel
downloading of resources (most CDNs offer this out of the box)
17. 7h. CSS Image Sprites
โ
A CSS image sprite is a collection of images put into a single
image to avoid multiple server requests.
โ
Use any reliable tool like http://spritepad.wearekiss.com/#
to quickly generate a sprite and its CSS
18. 7e. Deferring JavaScript Parsing
โ
Processing of all elements below an external script is blocked until the
browser loads the code from disk and executes it.
โ
Identify all JavaScript functions that are not actually used before the onload
event and place it in another external file which you can download after
the onload event.
โ
Place this code just before the </body> tag:
โ
<script type="text/javascript">
โ
function downloadJSAtOnload() {
โ
var element = document.createElement("script");
โ
element.src = "defer.js";
โ
document.body.appendChild(element);
โ
}
โ
if (window.addEventListener)
โ
window.addEventListener("load", downloadJSAtOnload, false);
โ
else if (window.attachEvent)
โ
window.attachEvent("onload", downloadJSAtOnload);
โ
else window.onload = downloadJSAtOnload;
โ
</script>
19. 7i. Choosing a web hosting
โข A good web hosting company is extremely important but
its mostly a matter of opinion. Certain factors however
can help in making the right decision like:
โ
Server Uptime
โ
Server Response Time
โ
Value of Money w.r.t Resources Offered
โ
Customer Support
โ
Positive Reputation and Reviews
20. 8. How to optimize code for optimal
website performance?
โ
Minimize global variables
โ
Use hardcoded HTML in header as much as possible
โ
Avoid DB calls as much as possible
โ
Put/Include Stylesheets in the <head> and Scripts just
before the </body> tag
โ
Inline small external CSS resources whenever possible
โ
Write clean and validated HTML
โ
Avoid CSS @import and use <link> instead
โ
Avoid using HTML tables
โ
Nesting HTML tables is a sin
โ
Never leave an Image 'src' attribute empty
21. 9. How to quickly make a static <div>
based design responsive?
โข Its a simple two step process:
โข
โ
Defining media queries for different screen sizes
โ
Setting auto/percentage widths with max-widths
โ
โ
โ
Note: CSS Frameworks like Bootstrap or Foundation
automatically provide responsive UI elements