Leverage Proxy Caching


For viewing all tips see here


Applicable To
All Browsers

How Improves Page Load Time
By optimizing network latency (network related)

Prologue
It enables static resources to be cached on public web proxy servers (most notably those used by ISPs), which might be nearby than origin remote server.


Why
o        Significant reduction in network latency
o        Even first time user might get benefit of caching because once the static resource is cached on proxy server by one user, the resource is available for all other users requesting subsequently.
o        Benefits of free web hosting as once resources are cached on public web server, subsequent requests are served from the public web server, which doesn’t consume any bandwidth on origin web server.


How
o        Use Cache-Control: public header to indicate that a resource can be cached by public web proxy servers
o        Don’t include query string in the URL for static resources as most proxies don’t cache resources when ‘?’ is present in the URL and Cache-Control: public is explicitly set.


Exceptions
o        Don’t enable proxy caching for resources that set cookies because setting cookies in public web proxies means to share cookies as well among other users.  Either set the Cache-Control header to private or serve the resources from cookie-less domain.
o        Be aware of issues with proxy caching of JS and CSS files as some public proxies do not detect the presence of Content-Encoding response header and send compressed version of file to client browser that cannot properly decompress the file.  To fix this either doesn’t allow public web proxies to cache these resources or set the Vary: Accept Encoding response header.


Recommendations
Don’t use it if the application is multi-homed and relies less on proxy caches for user locality

Comments

Popular posts from this blog

Performance Test Run Report Template

Understanding Blockchain

Bugs Management in Agile Project