Thursday, May 01, 2014

WDC 1.6 controlling 3rd party scripts

types
- ads
- tracking
- social e.g discus, fb
- fonts
- libraries and framework

what the first #1 used 3rd script?
facebook.

whats the issue?
performance
single point of failure
privacy

potential solutions?
safe snippet
caching and hosted libs
tools and initiatives

--
performance?
- slowdown ur homepage
the value u get must be greater than the performance hit u r taking

precription- the fastest is the better use look ads.

e.g ymail vs gmail. ymail more ads

using no ads reduce 40%


--
single point of failure?
- will stops the function of page
script src=""

will block the page after this script

e.g
twitter widget wont work in china

useful tool
spof-o-matic

u can debug and illustrate spof

--
solution
- put the code in the buttom
- using async or defer (load after)
- or load it manually using httprequest async

--
prevention
* protect urself with the help of tools


caching ?
dont always rely on it.
cache the script less so it there is error only last shorter

hosting cdn?
instead refer to cdn jquery
use the script if cdn available then use cdn if not than use local scripts

whats the verdict?
- use ur own cdn. 


--
privacy?
e.g like button
what they dont tell u? track, visited ip,etc

privacy hero solutions
2 click solutions,(open search)
- click enable like button  


--
solutions
-google use asyn scripts
-jsmanners (rating for scripts)


summary
* before copy paste scripts
- refuse no async
- put risk in sla (uptime,etc)
- review jsmanner
- ask for server side options
- evaluate tag managers
- investigate hosted libs (cdn)
- monitors3x (use monitoring tools)
- provide non blocking code samples and simple


bitly.iy/3rdparty-code-14


--

No comments: