<?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 Hidayat Febiansyah on Medium]]></title>
        <description><![CDATA[Stories by Hidayat Febiansyah on Medium]]></description>
        <link>https://medium.com/@hidayat.febiansyah?source=rss-a54e4e0248e2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QptG-YirbHkIM-u_L-SbhQ.jpeg</url>
            <title>Stories by Hidayat Febiansyah on Medium</title>
            <link>https://medium.com/@hidayat.febiansyah?source=rss-a54e4e0248e2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 06:28:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hidayat.febiansyah/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[Web States and Where to Find Them]]></title>
            <link>https://medium.com/bliblidotcom-techblog/fantastic-states-and-where-to-find-them-27babeef2aab?source=rss-a54e4e0248e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/27babeef2aab</guid>
            <category><![CDATA[web]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[storage]]></category>
            <dc:creator><![CDATA[Hidayat Febiansyah]]></dc:creator>
            <pubDate>Sat, 29 Jun 2019 14:56:15 GMT</pubDate>
            <atom:updated>2019-06-29T14:56:15.858Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fantastic States and Where to Find Them</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*KjOWLo8ZbzY_S6mnjFJVAg.png" /><figcaption>image source: <a href="https://www.digitalspy.com/movies/a824289/fantastic-beasts-creature-design-animation/">https://www.digitalspy.com/movies/a824289/fantastic-beasts-creature-design-animation/</a> , with fair usage</figcaption></figure><p><strong>Webpage states</strong> store variables, configs and other data related items for a website. Those states will determine how page is displayed, which components are active, which ones are hidden or disabled, what colour they have, and other limitless possibilities of presentation in the page.</p><p>States can also store <strong>security tokens</strong> and other sensitive data to certain degree. For example, <strong>cookies</strong> made by server, can be stored in the browser, and sent back to the server for validations. We also store <strong>OAuth token</strong> in states and sent over as header in the request.</p><p>What we will discuss in this article is how we can manage <strong>media for states</strong> and discussing <strong>pros-cons</strong> and <strong>use cases</strong> of each.</p><h3>TL;DR</h3><p><strong>Volatile: gone upon reload</strong></p><ul><li>Local variables</li><li>Global Variables</li></ul><p><strong>Persistent: stays on reload</strong></p><ul><li>Cookie: small token or hash value</li><li>Secure and HTTP Only Cookie: session data, sensitive user data</li><li>Server Session</li><li>Web Storage</li><li>IndexedDB</li><li>Cache Storage</li><li>URL</li></ul><h3>Local Variables</h3><p>You can declare it in function, object, or class scope.</p><p>Basically, you store and use it within the scope and it will diminish once we exit the scope or the object get destroyed.</p><p>Examples:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ef09446a3d87b6f4d2b391d11ff6cf01/href">https://medium.com/media/ef09446a3d87b6f4d2b391d11ff6cf01/href</a></iframe><p>This is the simplest place to put <strong>variable</strong>, and intended to be used <strong>locally</strong> (hence the group name implies). When the variable is needed globally, we will need it to be put in global (window) scope.</p><p>Use case for local variable is for <strong>temporary</strong> or <strong>private data</strong>.</p><h3>Global Variables</h3><p>Simply saying window.varA = 5 , will have varA accessible across all components in the page. An id of an element in web page, is also a global variable:</p><blockquote>&lt;div id=”abc”&gt;text&lt;/div&gt;</blockquote><p>It can be accessed with window.abc .</p><p>It’s very easy to implement, and maybe enough for small-scale system with only few people working on it. Data can be accessed and declared easily and available right away throughout the page.</p><p>However, managing global variables like that will have a lot of scalability problem, from naming management to how we can support modularity across various teams and sub-systems.</p><p>We have to explicitly define what prefix of what object will be limited to which team. For example, window.TEAM_A_VARS will only be used by Team A, but actually in reality, other teams can alter the data without Team A knowing, and will be getting harder to trace back the changes later on in the future.</p><p>Declaring something global needs validation to avoid duplication of naming, hence we will require thorough inspection of all global variable declared in the system and sub modules. In some bad working habit, some people tend to declare variable just as global without any reason.</p><p>Use case for global variable is for <strong>globally referred component</strong>, <strong>global constants / keys</strong>,<strong> tracker ids</strong>, and other <strong>public data</strong>.</p><h3>Cookie</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*UVlpAuCavS_AEZIKV1RvHA.png" /><figcaption>http cookie</figcaption></figure><p>This is probably the most common storage for web page states. It offers benefit of always synchronised state between client (web browser) and server, since all data in Cookie will be sent over in each web request, thus the server will be able to read it right away.</p><p>In the early stages of HTTP 2.0, Cookie had its golden age with storing encoded large page state into it, from user credentials, temporary form data, user menus, personalisation, to wizard pages data that can grow to several hundreds of KBs.</p><p>On the other side, we find that large size of Cookie will affect performance and reduce response time. Because of its ease of use, people abused it to the point that it clogged the system. Large data will take longer time to be submitted to server and it will also take more CPU time and memory allocation to decode Cookie data.</p><p>Because of that, Cookie is intended to store <strong>small amount of data</strong>, probably just a <strong>key</strong> or a <strong>simple hash </strong>value for session or token. We should not store form fields and other large data in cookie, since it will affect performance.</p><h3>Secure &amp; HTTPOnly Cookie</h3><p>It is Cookie but with “secure” flag.(<a href="https://en.wikipedia.org/wiki/Secure_cookie">https://en.wikipedia.org/wiki/Secure_cookie</a>)</p><p>This restrict the Cookie to be sent only in secure network (HTTPS), although if the browser didn’t comply to it, the secure flag will just be ignored.</p><p>HTTPOnly Cookie is intended for data that will be created by server, and only read by server. Usually it’s used for session, either <strong>authentication</strong> or <strong>tracking</strong>. This flag is useful to store user session and prevent it from being read by <strong>malicious JS code</strong>.</p><h3>Server Session</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*eL73cuW3j8UHcTgzaxb8sw.png" /><figcaption>cloud storage</figcaption></figure><p>Instead of storing the data in the browser, we can also store it in the server. This method is useful if your webpage is server side rendered (SSR). If not, there should be a mechanism to retrieve the variables, maybe through API.</p><p>Storing data in the server will still involve Cookie as session id storage.</p><p>Using server session will require continuous memory allocation in the server, thus memory requirement will be increasing linearly with number of connected user. In terms of scalability, storing large data in server session is not a preferable method.</p><p>Usage example for server session is for storing <strong>data caching</strong> and <strong>system configuration</strong>. It can be also used to store <strong>personalization data </strong>for user.</p><h3>Web Storage</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*K3u0CAfZepy6OGW5qlEg3Q.png" /><figcaption>super html5</figcaption></figure><p>Introduction to HTML5 brought us Web Storage. As the name implies, it is a storage for the web, placed in the client (browser). The purpose of this storage is to accommodate <strong>larger data</strong> for a website to use.</p><p>For example, we can store <strong>web-based game progress and assets</strong>. Next time the game loads, all the assets are readily available, and we can continue playing rather than starting from beginning again.</p><p>Another usage is to store <strong>response from server API</strong>, that is most likely unchanged. We can also store lots and lots of flags, without limit.</p><p>Different from Cookie, web storage will not be sent to the server, so no matter how big we store data here, it will not affect web performance.</p><p>There are two types of web storage: session and local. Session storage persist within a browser tab. If the tab is closed, all the data will be gone. Meanwhile, local storage persist throughout the browser application. It will never be gone, and can be accessed across tabs, within the same domain.</p><p>However, web storage has some problem with <strong>data retention</strong>. There is no API in web storage to automatically delete data after certain amount of time. Along the way, data kept piled up and piled up and at certain moment, no one knows which data belongs to which.</p><h3>IndexDB</h3><p>It is an advanced version of Web Storage, replacing WebSQL. IndexDB is a structured version of Web Storage. Instead of just key-value pair, IndexDB is a <strong>lite version database</strong> but in the web browser. We can store data and do query at it.</p><p>It’s a better alternative to Web Storage, with capabilities also to create <strong>database and tables</strong>, so we can manage better our data and may provide offline mode when the network is not available.</p><h3><strong>Cache Storage</strong></h3><p>With the introduction of Service Worker and PWA, web browser has the capability to behave like a <strong>native application</strong>. User can install the “web page” as an icon in the desktop.</p><p>During installation, browser will download pre-cached scripts and required assets to run it locally, even in offline mode. When the icon app is clicked, a webview (browser) without any address field will pop up and provide native-like app experience.</p><p>Example usage of this cache storage is for storing:</p><ul><li><strong>assets (js, css, images)</strong></li><li><strong>AJAX responses</strong></li><li><strong>user configurations and other cache-able data</strong></li></ul><h3><strong>URL</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*0PxYm0r0_C50ALDz.png" /><figcaption>permalink setting in wordpress</figcaption></figure><p>Last but not least, the URL.</p><p>It is actually most forgotten way of storing a variable, because of technical limitation of the past, yet also because of there is usually no “page reload” case in the flow.</p><p>We usually store the state in URL in the form of permalink (permanent link) to a page in the site. For example, if we want to access a post in a news site, we can go with this flow:</p><p>Open homepage (http://news.abc) -&gt; click first news -&gt; news displayed in the page</p><p>Usually, upon clicking the first news, it will reload the page and redirect it to a new url with id of the post attached to the url:</p><p><a href="http://news.abc/?postId=1234">http://news.abc?<strong>postId=1234</strong></a></p><p>Attaching the id in the url as postId, is a way of storing a variable. From the url, we can induce that 1234 is the data id we are looking for.</p><p>We can store the postId in the example, but how about showing a modal. We can put a flag in the url using # (hashtag):</p><p><a href="http://news.abc/?">http://news.abc?</a><strong>postId=1234</strong>#<strong>showSubcribeModal</strong></p><p>We can have flag from the #showSubscribeModal, when it’s there, a modal will be shown.</p><p>What I mentioned about technology limitation before, it is because when we modify the url query, we will need the page do to page reload, not an acceptable solution. That’s why a hashtag is used. But it just adds ambiguity whether it’s actually a data in the page or is it a bookmark of an element.</p><p>Nowadays browser, support <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">history pushstate</a>, where we can change url without reloading it. We can store as many flags as we need there, and upon reload, the intended behaviour will be kept just like before we were reloading it.</p><p>This method ensure consistent behaviour throughout a page, and requiring no global variable declaration inside the code, because it can be read by any component of the page using <em>window.location.href </em>API.</p><p>Use cases of url states are usually for<strong> modal page, wizard, sub page, resource id, paging data</strong>, and many more.</p><h3>We Are Hiring for Blibli.com Bandung and Jakarta</h3><p>Interested on tweaking web and worked with the cutting edge technology? Come and join us Blibli.com Frontend Engineers. We are also opening office in Bandung.</p><p>You can contact me directly <a href="https://medium.com/u/a54e4e0248e2">Hidayat Febiansyah</a> through email <a href="/service/mailto:hidayat.febiansyah@gdn-commerce.com">hidayat.febiansyah@gdn-commerce.com</a></p><h3><strong>Conclusions</strong></h3><p>There may be many other ways to store web states, other alternatives are welcome in comment section.</p><p>We may soon see how native apps get replaced by their web-based substitutes, with less compatibility headache yet providing easier development and delivery.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27babeef2aab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bliblidotcom-techblog/fantastic-states-and-where-to-find-them-27babeef2aab">Web States and Where to Find Them</a> was originally published in <a href="https://medium.com/bliblidotcom-techblog">Blibli.com Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Time for a change of Vue]]></title>
            <link>https://medium.com/bliblidotcom-techblog/time-for-a-change-of-vue-9320c2ec4321?source=rss-a54e4e0248e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/9320c2ec4321</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[Hidayat Febiansyah]]></dc:creator>
            <pubDate>Mon, 14 Jan 2019 11:00:44 GMT</pubDate>
            <atom:updated>2019-01-14T11:16:43.477Z</atom:updated>
            <content:encoded><![CDATA[<p>“What? UI development? No-sir, you can have it”..</p><p>That discussion were common (still going around now), when someone got assigned for UI implementation.</p><p>It was a very loooong step to get ready for first pull request (new dev onboard).</p><p>A loooong way to start your hands for testing, just after a mere two words update in the code (e.g. changing color in css).</p><p>A very tiring sequence of dully works just to put a patch.</p><p>Yet, the result was far from satisfying: large code-base, scattered codes, huge amount of foot print in minified client code, and untested functionality (unit testing).</p><p>R&amp;D had initiative to put ease developers mind on implementing UI. We tried to find a way for developer to deliver fast product with high quality standard.</p><p>Currently, our UI layers are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*NRdmQXfusiICMDHozygPNg.png" /></figure><p>As simple as browser request a page to our ui server, the server then render the content: fetches data from our backend systems, passes data into jsp templates provided, combines templates related to the page, then returns the page to user.</p><p>A little bit info on the production, we had problem with this architecture as server resources will be demandingly high. Resource requirement goes exponentially over time, in other words, it is not scalable enough. We are using tomcat workers to handle requests, each worker bound to only one request, unable to serve other requests while idling waiting for backend call to respond. In the end, we have to keep adding more and more hardware to satisfy higher concurrent user access (RAM size).</p><p>Back to UI developer experience, development problem lies in the speed of newly joining developer to get onboard and how fast we can do the patching.</p><p>Using this architecture, developers are forced to download whole server codes, run real tomcat in their workstation/laptop, then deploy the build file (war) and wait till deployment in local server done.. if there was no error ;)</p><p>It took 5 minutes at best, and possibly failure after more than 10 minutes (need to retry again) at worst. Doing that 3 times.. boom, half an hour of your life gone.</p><p>UI developers should have not care about what backend implementation is, furthermore, they couldn’t be care less about running the java codes and tomcat. When modifying a single file, it would be great if we are not required to redeploy to tomcat server again. But how?</p><p><strong>New UI Framework exploration launched</strong></p><p>Currently, we are using Angular 1, quite old in JS world standard.. we can say, it started to become obsolete. Many new features for web especially on HTML5 are not present in Angular 1. Maybe we should be moving to Angular 2 (or 4 now?), that’s what we had in mind that time.</p><p>You may refer to our UI development history in this page: <a href="https://medium.com/bliblidotcom-techblog/evolusi-front-end-developer-di-blibli-com-4b6d8622fbb8?source=collection_detail----6927be317100-----5----------------">Evolusi Front End Developer di Blibli.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*Uxf3WOfe5-QQDI6oCXXz4A.png" /></figure><p>Our UI development stacks:</p><ol><li>Angular 1</li><li>Grunt</li><li>JSP</li><li>JSP tags</li><li>jQuery</li><li>Bootstrap</li><li>Other jQuery plugins, e.g. autocomplete, sliders</li><li>All running in tomcat server</li></ol><p>This stack is good enough for us to deliver production script to the end user, packaged together with tomcat war file, and deployed through automation system to production server.</p><p>However, as mentioned above, developing UI in this stack took so much effort. All back to running whole tomcat server and redeployment of all archive just to see a speck of change.</p><p>We started exploring alternatives of technologies for these layers:</p><ol><li>UI framework (rendering)</li><li>Build framework</li><li>Development framework</li><li>Deployment</li></ol><p>For UI Framework (or… library turned into framework), we have Angular 1, Angular 2, React, ember, riot.js, vue.js and many others. Our main factors for consideration are rendering speed, slope learning curve and community/doc support.</p><p>For build framework, we have few choices, such as Grunt, Gulp and webpack.</p><p>Meanwhile, development framework here means how we structure the projects, which boilerplate to choose, hot reload, and many other development related tasks.</p><p>Lastly, our new application should be easy for deployment, and should not be worse in terms of performance from the old one.</p><p><strong>UI Framework</strong></p><p>Long story short.. we chose Vue.js.</p><p>Many resources promoting Vue over other frameworks, you can see it here: [1], [2], [3].</p><p>It will be a waste of effort to go full defense explaining on why choosing Vue here, you can read up all the reasoning there anyway. However, to get to know with the alternatives frameworks/libraries, we first had internal discussion and split up works to implement a simple slider and input form using various Frameworks. Strong candidates were React, Angular 2 and Vue. Based on our hands-on, we finally chose Vue.</p><p>Vue’s speed is fast enough, a lot faster compared to Angular, but still provides sloper learning curve compared to React… some people say, Vue is the marriage between Angular and React.. oh, so sweet isn’t it.</p><p>Our preference also from the research team, that coding using templating is better than following React way of creating another layer of language on top of regular HTML code.</p><p>Flexibility was found to be important. We don’t want to be bound with certain non-essential complexity, such as the needs of Typescript to write code in Angular 2. It will take another part of our lifetime just to learn a language that will be transformed into vanilla JS, adding unnecessary development overhead.</p><p>Here is the performance table comparison among various JS frameworks/libraries: [4].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*QflhMwGcQqh42td_B8c4rA.png" /></figure><p>All green on Vue.. case closed :)</p><p><strong>Build Framework</strong></p><p>Our UI development build method was using Grunt script. JS and CSS files are grouped into pages name, then those files got bundled into minified js and css files using grunt.</p><p>This method encouraged a lot of duplication. Because a script file is created based on functionality related to that page, when another page wants to reuse it, we have to make sure it will not break in all other page using that script. Encapsulation is still hard in this case, because it’s not build based on modular components. Codes are scattered across unknown files because there is no fix standard of where to put which in the framework.</p><p>Because of the nature of Angular 1, only God knows what are inside each js files. The files are unnecessarily too long and having various coding standard across the functions. We want to introduce also efficient coding, separating between logic and data fetch layer, for example.</p><p>Here, we introduce JS Linting. We are forcing the same code writing standard. It can do syntax checking and variable validations.</p><p>Our build tool move to webpack and all it’s plugins: common-chunk, vue-loader, name hash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*sCI5QI2140TplgxohBC3mg.png" /></figure><h3><strong>Conclusions</strong></h3><p>Our new UI Stack is more robust and able to be split into vertical teams, delivering content with high speed and short development time.</p><h3><strong>References</strong></h3><p>[1] Why we moved from Angular 2 to Vue.js (and why we didn’t choose React), <a href="https://medium.com/reverdev/why-we-moved-from-angular-2-to-vue-js-and-why-we-didnt-choose-react-ef807d9f4163">https://medium.com/reverdev/why-we-moved-from-angular-2-to-vue-js-and-why-we-didnt-choose-react-ef807d9f4163</a>, accessed September 2017</p><p>[2] Why we chose Vue.js over React, <a href="http://pixeljets.com/blog/why-we-chose-vuejs-over-react/">http://pixeljets.com/blog/why-we-chose-vuejs-over-react/</a>, accessed September 2017</p><p>[3] Why We Chose Vue.js, <a href="https://about.gitlab.com/2016/10/20/why-we-chose-vue/">https://about.gitlab.com/2016/10/20/why-we-chose-vue/</a>, accessed September 2017</p><p>[4] Performance comparison among JS libs and frameworks, <a href="http://www.stefankrause.net/js-frameworks-benchmark6/webdriver-ts-results/table.html">http://www.stefankrause.net/js-frameworks-benchmark6/webdriver-ts-results/table.html</a>, accessed September 2017</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9320c2ec4321" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bliblidotcom-techblog/time-for-a-change-of-vue-9320c2ec4321">Time for a change of Vue</a> was originally published in <a href="https://medium.com/bliblidotcom-techblog">Blibli.com Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modern SEO Techniques]]></title>
            <link>https://medium.com/bliblidotcom-techblog/modern-seo-techniques-e32fe823b5cf?source=rss-a54e4e0248e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/e32fe823b5cf</guid>
            <category><![CDATA[csr]]></category>
            <category><![CDATA[sap]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[seo]]></category>
            <category><![CDATA[ssrs]]></category>
            <dc:creator><![CDATA[Hidayat Febiansyah]]></dc:creator>
            <pubDate>Mon, 01 Oct 2018 13:35:23 GMT</pubDate>
            <atom:updated>2019-12-20T17:44:17.742Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*VExNq8DvwsTEQr443X1bPg.jpeg" /><figcaption>Infographic vector created by Freepik : <a href="https://www.freepik.com/free-photos-vectors/infographic">https://www.freepik.com/free-photos-vectors/infographic</a></figcaption></figure><p>Recently, Blibli.com pages are moving to Client-side Rendering (CSR). It means we will fetch data asynchronously using AJAX call and the browser will render it based on response data from server.</p><p>The opposite of the above method is the conventional way of Server-side Rendering (SSR). This method tells the web server to fetch data from data servers then write down all the html codes, letter by letter to the output stream and can be read plain-ly by the user (view html source).</p><p>SSR can be said as the safest method there is to make sure a web crawler (google, bing, etc) can read the page correctly and parse the text as-is from our web server.</p><p>However, as time went by, we had so many interactions in the client-side, with JS, and usually data are loaded without requiring page refresh/reload. This way of interaction is comfortable for user, yet we are worried that crawlers won’t spare any resource to execute our client script and wait for the result from server, not to mention rendering it in their browser.</p><p>Article from google webmaster [1] and independent test from [2] show that we can now be sure that CSR will get indexed well as long as we follow rules from the crawler (in this case Google).</p><p>Here are what we learned from our journey migrating to CSR.</p><p><strong>[TL;DR]</strong><br>* Support Chrome ≤41<br>* Clean URL<br>* Update your Meta in the client<br>* Support Social Media Sharing<br>* Responsive Design</p><h3>Support Chrome ≤41</h3><p>Make sure your page can run well on chrome 41. Try to render the page in webmaster tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cf5n3YNOvNjgjaX_Rw3e-w.png" /><figcaption>fetch as google to test out the page: <a href="https://www.blibli.com/p/gigabyte-gv-n108tgaming-oc-11gd-geforce-gtx-1080-ti-gaming-graphic-card-11-gb-gddr5x/ps--IDH-16956-01091">https://www.blibli.com/p/gigabyte-gv-n108tgaming-oc-11gd-geforce-gtx-1080-ti-gaming-graphic-card-11-gb-gddr5x/ps--IDH-16956-01091</a></figcaption></figure><p>You can transpile your code with babel to ES2015, or target it to chrome version 41.</p><h3>Clean URL</h3><p>Do not use “#” or “#!” in the URL.</p><blockquote><a href="https://www.example.com/#!product/25/">https://www.example.com/#!product/25/</a></blockquote><blockquote><a href="https://www.example.com/#!product/25/">https://www.example.com/#product/25/</a></blockquote><p>In the past, before the arrival of history API [4] in the browser, “#!” was the absolute solution for Single Page Application (SPA). SPA page will need no reload/refresh of the page to change the content. There were no option in the old browser to do that other than adding “#” in the URL.</p><p>Now, if you open the code:</p><blockquote><a href="https://www.blibli.com/p/gigabyte-gv-n108tgaming-oc-11gd-geforce-gtx-1080-ti-gaming-graphic-card-11-gb-gddr5x/ps--IDH-16956-01091">https://www.blibli.com/p/gigabyte-gv-n108tgaming-oc-11gd-geforce-gtx-1080-ti-gaming-graphic-card-11-gb-gddr5x/ps--IDH-16956-01091</a></blockquote><blockquote><a href="https://www.blibli.com/p/promo-motherboard-nec-microstar-ms-7479-with-lga-1155-garansi-1-tahun/ps--CAN-60021-00068?ds=CAN-60021-00068-00001&amp;list=Related%20Products">https://www.blibli.com/p/promo-motherboard-nec-microstar-ms-7479-with-lga-1155-garansi-1-tahun/ps--CAN-60021-00068?ds=CAN-60021-00068-00001</a></blockquote><blockquote><a href="https://www.blibli.com/home/">https://www.blibli.com/home/</a></blockquote><p>They are exactly the same code. Client script will read the URL and determine what data should be fetched from server.</p><h3>Update your Meta in the client</h3><p>We updated our meta (keywords, title, descriptions) using Vue-Meta plugin [3]. They are easy to use because we only need to add hook <strong>metaInfo() .</strong></p><p>We also added <strong>JSON+LD</strong> support that will enrich content crawling:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/848abfb29fe51d3d42ca45020f6fc4ea/href">https://medium.com/media/848abfb29fe51d3d42ca45020f6fc4ea/href</a></iframe><h3>Support Social Media Sharing</h3><p>Social media crawler, unfortunately has no client side rendering support, hence we need to prescribe a different approach. We have to return fully rendered site to them. But, it’s not a full blown page, only tags used by the crawler. For example, [5] will have different output when accessed with TwitterBot user agent:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/46508e10ce50bfd5f3f1e050c556db19/href">https://medium.com/media/46508e10ce50bfd5f3f1e050c556db19/href</a></iframe><h3>Responsive Design</h3><p>Mobile, mobile and mobile are the trends nowadays. So we start to develop things to be well displayed in mobile first, then stretch it for desktop.</p><p>In the past, we went for Adaptive design because we thought it will reduce data load in mobile users. However, that’s not what we found. Codes’ footprint are basically not that different between desktop and mobile, even though we did double the work and double the code files to implement on both.</p><p>Therefore, we moved to responsive design to reduce our workload. We also use feature of code-splitting from webpack that can load codes asynchronously, so we can pick which UI component to load based on current environment (mobile/desktop).</p><p>Google loves “mobile-friendly” pages. So, instead of making two unrelated codes, we better optimize for mobile first then desktop will follow.</p><p>You can search about google’s preference of mobile-friendly page, but here are some articles discussing it [8][9]. I quote:</p><blockquote>What Google Says…</blockquote><blockquote>“Starting April 21 2015, we will be expanding our use of mobile-friendliness as a ranking signal. This change will affect mobile searches in all languages worldwide and will have a significant impact in our search results. Consequently, users will find it easier to get relevant, high quality search results that are optimized for their devices.”</blockquote><p>You can read more here [6] on the difference of Responsive vs Adaptive.</p><p>Regarding webpack code splitting will be discussed in future story, but you can catch up here [7].</p><h3>We Are Hiring for Blibli.com Bandung and Jakarta</h3><p>Interested on tweaking web and worked with the cutting edge technology? Come and join us Blibli.com Frontend Engineers. We are also opening office in Bandung.</p><p>Submit your CV here <a href="https://www.blibli.com/page/karir/">https://www.blibli.com/page/karir/</a></p><p>You can contact me directly <a href="https://medium.com/u/a54e4e0248e2">Hidayat Febiansyah</a> through email hidayat.febiansyah@gdn-commerce.com</p><h3>Conclusions</h3><p>To summarize, we are embracing new era of SEO where CSR is fully supported (at least by Google).</p><p>We are very welcome for questions and suggestions for Blibli.com page in the future.</p><h3>References</h3><p>[1] <a href="https://webmasters.googleblog.com/2016/11/building-indexable-progressive-web-apps.html">https://webmasters.googleblog.com/2016/11/building-indexable-progressive-web-apps.html</a>, September 2018</p><p>[2] <a href="https://centrical.com/test/google-json-ld-and-javascript-crawling-and-indexing-test.html">https://centrical.com/test/google-json-ld-and-javascript-crawling-and-indexing-test.html</a> , September 2018</p><p>[3] <a href="https://github.com/declandewet/vue-meta">https://github.com/declandewet/vue-meta</a>, September 2018</p><p>[4] <a href="https://caniuse.com/#feat=history">https://caniuse.com/#feat=history</a> , September 2018</p><p>[5] <a href="https://www.blibli.com/p/gigabyte-gv-n108tgaming-oc-11gd-geforce-gtx-1080-ti-gaming-graphic-card-11-gb-gddr5x/ps--IDH-16956-01091">https://www.blibli.com/p/gigabyte-gv-n108tgaming-oc-11gd-geforce-gtx-1080-ti-gaming-graphic-card-11-gb-gddr5x/ps--IDH-16956-01091</a> , September 2018</p><p>[6] <a href="https://css-tricks.com/the-difference-between-responsive-and-adaptive-design/">https://medium.com/r/?url=https%3A%2F%2Fcss-tricks.com%2Fthe-difference-between-responsive-and-adaptive-design%2F</a> , September 2018</p><p>[7] <a href="https://medium.com/js-dojo/3-code-splitting-patterns-for-vuejs-and-webpack-b8fff1ea0ba4">https://medium.com/js-dojo/3-code-splitting-patterns-for-vuejs-and-webpack-b8fff1ea0ba4</a> , September 2018</p><p>[8] <a href="https://www.businessnewsdaily.com/7808-google-search-ranking-mobile.html">https://www.businessnewsdaily.com/7808-google-search-ranking-mobile.html</a> , September 2018</p><p>[9] <a href="https://creativewebideas.co.nz/google-loves-mobile-responsive-websites/">https://creativewebideas.co.nz/google-loves-mobile-responsive-websites/</a>, September 2018</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e32fe823b5cf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bliblidotcom-techblog/modern-seo-techniques-e32fe823b5cf">Modern SEO Techniques</a> was originally published in <a href="https://medium.com/bliblidotcom-techblog">Blibli.com Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In Speed We Trust]]></title>
            <link>https://medium.com/bliblidotcom-techblog/in-speed-we-trust-3d32b806e05e?source=rss-a54e4e0248e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d32b806e05e</guid>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Hidayat Febiansyah]]></dc:creator>
            <pubDate>Thu, 07 Sep 2017 15:24:50 GMT</pubDate>
            <atom:updated>2017-09-08T10:33:22.628Z</atom:updated>
            <content:encoded><![CDATA[<p>Speed is Gold.. don’t keep on silence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wAdDo4sTXpB4RzC19VtJ_g.png" /><figcaption><a href="http://www.blibli.com/">www.blibli.com</a> homepage</figcaption></figure><p>Last year, we had a challenge to improve Blibli load time. It was a challenge that many have fallen, and had always been the war of interests..</p><p>A war between Business users wanting features, against us, Developer having less site load time as our KPI.</p><p>What I meant by interests was, when the developers were asked to improve the load speed, we were faced with overflowing feature requests.. then choices should be made, speed xor features. At that time, we chose many times on features.. expecting a better user experience by pushing new features. More features should mean higher traffic, in turn increased GMV.</p><p>However, researches has proven, speed is certain order of magnitude more important than abundant feature.</p><p>Every second counts <a href="https://blog.kissmetrics.com/loading-time/">[</a>1] and [2]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*mK4PvZIYmtz6uzh7ra7wtQ.jpeg" /><figcaption><a href="https://blog.kissmetrics.com/speed-is-a-killer/">https://blog.kissmetrics.com/speed-is-a-killer/</a></figcaption></figure><blockquote>According to <a href="https://blog.kissmetrics.com/loading-time/">surveys done by Akamai and Gomez.com</a>, nearly half of web users expect a site to load in 2 seconds or less, and they tend to abandon a site that isn’t loaded within 3 seconds. 79% of web shoppers who have trouble with web site performance say they won’t return to the site to buy again and around 44% of them would tell a friend if they had a poor experience shopping online.</blockquote><p>What is the average loading time among e-commerce in Indonesia? By our measurement.. far beyond 8 seconds.. including us, Blibli.com.</p><p>There really is something we must do about this.</p><p>My own experience, I was searching an item in <a href="http://www.blibli.com/">blibli</a>.com for maybe around 30 minutes. I was so excited to buy it there.. However, because the search result came up in around 20 seconds.. Suddenly, a question came up in my mind, how much is this item in another site..? Guess what happened! I closed the page and explore other competitors, a sad truth.</p><p><strong>Abundant features are not everything, the FOCUS of customer is.</strong></p><p>Do not let customer to have second thought on your items, let them focus on the items and wanting to execute checkout as soon as possible.</p><p>Regarding focus, you can look at the closest example.. your iPhone/android phone.. how many buttons are there?</p><p>Well, mostly nowadays, one button at front-facing, 3 other buttons in the right side, and a toggle in the left side..</p><p>Only one button at your view, providing simplicity.. and allowing user to get onboard quickly on using the phone. High FOCUS of customer on utilizing the phone, rather than distracted by many buttons.</p><p>Another example, related to web, is Google homepage.. how many items are there? It’s still countable by your fingers.</p><p>Google homepage is simple, fast, and focused entirely on its main goal, giving you a place to start typing search terms.</p><p>The silver lining of both are.. speed.. speed to get on board.. speed to provide the UI as soon as possible. Speed that will prevent the user to have second thought.</p><p><strong>The first step</strong></p><p>We had a pre-loader image.. a bouncy shopping bag that would keep on dancing until the page is completely loaded. It was a quite long dance though.. a minute or even more.</p><p>That was what we had till middle of last year. A not-funny bouncing shopping bag in our homepage. Rather than giving a good experience to user, it gave us (at least me personally) a traumatic experience.</p><p>Why? Because the homepage sometimes loaded fast, but in most cases it will wait up to one minute (browser max connection timeout) for the blinking dancing bouncing shopping bag to disappear. In not too rare cases, that stupid ridiculous dancing bouncing shopping bag wouldn’t vanish…… -_____-! then we are forced to reload the page, just to keep on trying.</p><p>What a pain in the a*s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/84/1*g9bbsoXAJ2JkSDPn7CV2dQ.gif" /><figcaption>the pre-loader: cute isn’t it?</figcaption></figure><p>That’s what I and <a href="https://github.com/dodotdot">Herwidodo </a>(my team-mate) were targeting first, along with the no-style login status and disappearing search box.</p><p>We killed the annoying dancing bouncing shopping bag, put a style on simple eye-serving search box and styled login status on first render.</p><p>The experience went much better. It was fun, again.. delightful.. remarkable.. bravo. Just a quick tweak, and the world of fun shopping experience was open again right before our eyes.</p><p><strong>Defer as you can</strong></p><p>But still.. something was still missing, even though the page seemed to be loaded quickly, there was still some glitch at the first load. We found out it was because of our js and css files were hold behind by trackers files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p7gARUbRroAFfYOXznjxxg.jpeg" /><figcaption><a href="https://gladly.io/blog/2016/02/03/internet-connection-speed-adblocking/">https://gladly.io/blog/2016/02/03/internet-connection-speed-adblocking/</a></figcaption></figure><p>That is our next enemy.. the trackers..</p><p>Based on suggestion here [3], we pull it back after the page is loaded (defer the script).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*MTkib7Z1PDaSJvgqTOEDGQ.jpeg" /><figcaption>example from [3]</figcaption></figure><p>It worked like a charm :)</p><p>Although we had internal disagreement about this, we finally had a convention on which to load and when.</p><p>Afterwards, our site load time got trimmed half. Customer satisfaction index is higher in our analytic page, and the most important thing of all is us, the developer, we finally made a progress on speed.</p><p>A step that would be remembered as a milestone and opened up another possibility.. on changing our vue :)</p><p><strong>References:</strong></p><p>[1] How Loading Time Affects Your Bottom Line, <a href="https://blog.kissmetrics.com/loading-time/">https://blog.kissmetrics.com/loading-time/</a>, September 2017</p><p>[2] Speed Is A Killer — Why Decreasing Page Load Time Can Drastically Increase Conversions, <a href="https://blog.kissmetrics.com/speed-is-a-killer/">https://blog.kissmetrics.com/speed-is-a-killer/</a>, September 2017</p><p>[3] How tracking scripts affect page loads… can tracking scripts kill my web app?, <a href="http://mrcoles.com/blog/how-tracking-scripts-affect-page-loads/">http://mrcoles.com/blog/how-tracking-scripts-affect-page-loads/</a>, September 2017</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d32b806e05e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bliblidotcom-techblog/in-speed-we-trust-3d32b806e05e">In Speed We Trust</a> was originally published in <a href="https://medium.com/bliblidotcom-techblog">Blibli.com Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>