647). How does PhantonJS use YSlow?
[A]Queries
[B]Statements
[C]Command Line Prompt
[D]Command Line Script
Show Answer
Correct Answer: Command Line Script
Notes:
Answer: d
Explanation: YSlow for PhantomJS is a command line script that allows page performance analysis from live URLs, unlike YSlow for Command Line (HAR) where a pre-generated HAR file is needed in order to analyze page performance.
648). What are the two output formats YSlow uses?
[A]TAP, JUnit
[B] JIT, TRD
[C]JKP, RFD
[D]TIP, KIT
Show Answer
Correct Answer: TAP, JUnit
Notes:
Answer: a
Explanation: YSlow for PhantomJS is a command line script that allows page performance analysis from live URLs. YSlow for PhantomJS introduces new output formats for automated test frameworks: TAP (Test Anything Protocol) and JUnit.
649). Initially, YSlow was an extension of which browser?
[A]Chrome
[B]Firefox
[C]IE
[D]Opera
Show Answer
Correct Answer: Firefox
Notes:
Answer: b
Explanation: Initially, YSlow was an extension of Firefox. YSlow for Firefox needs Firebug to run.
650). Which of the following can be used for a deeper analysis of the web page’s performance?
[A]WebPageTest
[B]FireBug
[C]YSlow
[D]WebPageTest & FireBug
Show Answer
Correct Answer: YSlow
Notes:
Answer: c
Explanation: YSlow analyzes web page performance by examining all the components on the page, including components dynamically created by using JavaScript. It measures the page’s performance and offers suggestions for improvement.
651). How many rules are there in the YSlow version 2.0?
Show Answer
Correct Answer: 23
Notes:
Answer: a
Explanation: There are totally 23 rules in the ruleset of YSlow (V2) namely :
Minimize HTTP Requests
Use a Content Delivery Network
Avoid empty src or href
Add an Expires or a Cache-Control Header
Gzip Components
Put StyleSheets at the Top
Put Scripts at the Bottom
Avoid CSS Expressions
Make JavaScript and CSS External
Reduce DNS Lookups
Minify JavaScript and CSS
Avoid Redirects
Remove Duplicate Scripts
Configure ETags
Make AJAX Cacheable
Use GET for AJAX Requests
Reduce the Number of DOM Elements
No 404s
Reduce Cookie Size
Use Cookie-Free Domains for Components
Avoid Filters
Do Not Scale Images in HTML
Make favicon.ico Small and Cacheable
652). Which of the following is mandatory to run before running YSlow?
[A]WebPageTest
[B]FireBug
[C]Both WebPageTest and FireBug
[D]Mozilla
Show Answer
Correct Answer: FireBug
Notes:
Answer: b
Explanation: YSlow analyzes web page performance by examining all the components on the page, including components dynamically created by using JavaScript. It is mandatory to run FireBug before running YSlow.
653). How does the YSlow for Mobile work as?
[A]Bookwise
[B]Booklet
[C]Bookmarklet
[D]Bookmark
Show Answer
Correct Answer: Bookmarklet
Notes:
Answer: c
Explanation: The YSlow for Mobile works as bookmaklet. Bookmarklet is a JavaScript code stored as the URL of a bookmark in a web browser.
654). Which network allows you to distribute static assets like images, etc?
[A] Content Delivery Network
[B]Content Receiving Network
[C]System Area Network
[D]Local area network
Show Answer
Correct Answer: Content Delivery Network
Notes:
Answer: a
Explanation: A content delivery network (CDN) allows you to distribute your static assets like images, JavaScript files and stylesheets to geographically distributed servers. This gets the content of your page to your user’s browser faster.
655). What are the three important manipulations done in a for loop on a loop variable?
[A]Updation, Incrementation, Initialization
[B] Initialization,Testing, Updation
[C]Testing, Updation, Testing
[D]Initialization,Testing, Incrementation
Show Answer
Correct Answer: Initialization,Testing, Updation
Notes:
Answer: b
Explanation: In a for loop, the initialization, the test, and the update are the three crucial manipulations of a loop variable. Firstly the variable is created then it’s first tested then updated.
656). What convenience does the following JavaScript code?
let succ = function(x) x+1, yes = function() true, no = function() false;
[A]Functional behaviour
[B]Modular behaviour
[C]No convenience
[D] Shorthand expression
Show Answer
Correct Answer: Functional behaviour
Notes:
Answer: a
Explanation: The functions defined in this way behave exactly like functions defined with curly braces and the return keyword. The functions can be defined in a shorthand expression.