Twitter engineers have started an upgrade of the microblogging platform that will increase the page loading speed by an average of five times.
The performance boost is achieved by moving the rendering of the Twitter pages from the user’s browser to the server. Other changes include the disappearance of hashbangs (#!) from permalinks, and optimisation of the JavaScript code.
The upgrade will allow Twitter to take advantage of new browser technology and pave the way for fresh multimedia features.
Twitter, which has 10 million users in the UK, was built around a web application architecture that executed most of the code on users’ machines. According to the engineering manager of company’s web core team Dan Webb, the fully client-side architecture, while having a number of advantages, lacked support for various optimisations available only on the server.
The transfer to the servers also allowed Twitter to reduce differences in performance across browsers.
Another noticeable change is the simplification of permalink URLs, which will no longer use hashbangs (#!). “With hashbang URLs, the browser needs to download an HTML page, download and execute some JavaScript, recognise the hashbang path (which is only visible to the browser), then fetch and render the content for that URL,” explained Webb. Removing the need to handle routing on the client has contributed to the improvement in initial page-load performance.
Finally, by splitting the JavaScript into modules, engineers have enabled the client to only download the JavaScript necessary for the page to work, resulting in a smaller payload over the wire, fewer lines of code to parse and quicker execution times, Webb said.
Twitter will continue to roll out this new framework to the site in the coming weeks. Once the changes are in place, the company plans to implement partial page reloads and begin to overhaul the server side of the application.
Are you an expert on social networks? Take our quiz!
New chapter for famous name from Internet's early days, Napster, has been acquired and will…
Solving not-spots? Ofcom proposal to make UK the first European country to allow ordinary smartphones…
Pioneering robotaxi service from Alphabet's Waymo to go live in Washington DC next year, as…
Dozens of Chinese firms added to US export blacklist, in order to hamper Beijing's AI…
Chinese rival BYD overtakes global revenues of Elon Musk's Tesla, as record number of Tesla…
Messaging app Signal in the headlines after a journalist was invited to a top secret…