<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Saloni Jain on Medium]]></title>
        <description><![CDATA[Stories by Saloni Jain on Medium]]></description>
        <link>https://medium.com/@salonijain?source=rss-c481f1ac47da------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*HiLwgE579gZVwU8X.jpg</url>
            <title>Stories by Saloni Jain on Medium</title>
            <link>https://medium.com/@salonijain?source=rss-c481f1ac47da------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 12:35:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@salonijain/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Server Push for Web Performance]]></title>
            <link>https://medium.com/@salonijain/server-push-for-web-performance-8060af4aa439?source=rss-c481f1ac47da------2</link>
            <guid isPermaLink="false">https://medium.com/p/8060af4aa439</guid>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[server-push]]></category>
            <category><![CDATA[optimize-web-performance]]></category>
            <category><![CDATA[http2]]></category>
            <category><![CDATA[adobe]]></category>
            <dc:creator><![CDATA[Saloni Jain]]></dc:creator>
            <pubDate>Tue, 30 Jun 2020 12:08:59 GMT</pubDate>
            <atom:updated>2020-06-30T12:08:59.836Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*9eQFCmmsfI65PA1Odv48_g.png" /><figcaption>Http/2 Server Push</figcaption></figure><p>HTTP/2 gives us server push, which allows us to send assets to the user before the client asking for them. The initial request to a server is for an HTML document. After the server replies with the document, post parsing the HTML, the additional references are discovered and requested to the server in the form of separate requests. The issue with this approach is that it makes the user wait for the browser discovery and delays the rendering and increases load times.</p><p>HTTP/2 — Server Push lets us “push” critical assets to the client without the user asking for them. For, e.g., For <a href="http://www.adobe.com/products/photoshop.html,">www.adobe.com/products/photoshop.html,</a> pages rely on styles defined in publish.combined.css. When the user requests photoshop.html from the server, we can push the CSS file to the user ju­st after we can begin sending the response for photoshop.html.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4X5UVdASKrlXW1FEbHnLLg.png" /><figcaption>Pushed resources for www.adobe.com/products/photoshop.html</figcaption></figure><p>Adobe uses Akamai Adaptive acceleration(Akamai A2) — Akamai mPulse, which automatically server pushes resources depending on the popularity of the resources. Akamai A2 works well on websites where many of the pages use the same resources — they all have the same shared resources. A page that is not popular can still benefit from the shared resources determined from the popular pages in the A2 policy. In the CMS scenarios such as AEM, where some of the pages do not share the shared resources, there could be cross-pushing of resources, which can be detrimental to performance.</p><p>For Adobe, the A2 policy is re-generated every 2–4 hours with new beacons from the last 45 minutes from the start of further analysis. Due to this, the popular pages may change throughout the day. Since sampling is used on Akamai’s end, the resources are pushed on the popular pages and not on all the pages on a particular domain.</p><p>One interesting thing to note is that Akamai is also developing a feature of <a href="https://blogs.akamai.com/2016/04/are-you-ready-for-http2-server-push.html">manual server push</a>, which is in the BETA version right now.</p><h3>How to do server push?</h3><p>Apart from the automatic server push, there are other techniques to do server push, such as using the preload resource hint. Even though it is a distinct optimization, but most HTTP/2 implementations will server push the resources specified in Link header containing a <a href="https://w3c.github.io/preload/">preload resource hint</a>.</p><blockquote>link: &lt;/css/styles.css&gt;; rel=preload; as=style</blockquote><p>The client can still initiate the request if the server decides not to push the resource, which can happen if the server is not idle at any time. The link header configuration can be set in web apache configuration — Httpd.conf or .htaccess.</p><h3>Pushing multiple assets</h3><p>We need to separate multiple assets with a comma while pushing various assets.</p><blockquote>Link: &lt;/css/publish.combined.css&gt;; rel=preload; as=style,&lt;/js/publish.combined.js&gt;; rel=preload; as=script,&lt;/img/background_marquee.png&gt;; rel=preload; as=image</blockquote><p>As the resource hints are added via the Link tag, the comma-separated multiple assets mix in with other resource hints. Also, multiple resources can be pushed via the apache config.</p><blockquote>&lt;FilesMatch “\.html$”&gt;</blockquote><blockquote>Header add Link “&lt;/css/publish.combined.css&gt;; rel=preload; as=style”</blockquote><blockquote>Header add Link “&lt;/js/publish.combined.js&gt;; rel=preload; as=script”</blockquote><blockquote>&lt;/FilesMatch&gt;</blockquote><h3>Checking if Server push is working</h3><p>We can check this in the Network/Timing tab in the chrome developer tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THciPLqMa6DOJCIinki3lg.png" /><figcaption>Receiving server push in chrome dev tools</figcaption></figure><p>Also, with Akamai, we can see the akamai push header in the response headers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WQIfqRR1sgV3jES99jd4Qw.png" /><figcaption>Akamai headers for server pushed resources</figcaption></figure><h3>Performance Impact</h3><blockquote>Lighthouse score-wise, we can see a difference of about 5–8 points on a resource-rich page such as photoshop.html.</blockquote><p>The conclusion here is clear: With server push, we can achieve results that are slightly better than what we can deliver on HTTP/1. When we push many resources, we witness depreciating returns.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8060af4aa439" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>