Home, everybody. Thank you very much for logging in to this presentation on re-thinking responsive regulation. I hope you find the presentation clear and informative and helpful. And before I begin, I just like to thank Safe Work Australia for inviting me to give this presentation. It's a great privilege and honour to do it. Now, what I'm going to do today, is introduce you to the contemporary thinking about responsive regulation. And I'll start with a bit of history ac yn dotar, y gallwn y cyffredigau bwysigfyr rhagorau llwyaf nawr, ar yr ysafodol ar oeddo cym新iad fan ruiduaeth Simon a'r llwyaf yw'r rheidion a'r llwyaf a'r gweithwyriau. Ond rwy'n ei wneud byddai gyflyniadau y bwysigfyr rhagorau llwyaf yw ac oedd y bwysigfyr rhagorau llyfry am arwag ein llyfr gwrthwynau. Y bwysigfyr rhagorau llyfr behel yn unwyr yn rawr â'r rhagorau llwyaf. Second, the two pyramids that Areson Braithwaite's theory of responsive regulation is famous for, that is the enforcement pyramid and the pyramid of regulatory strategies, and then I'll finish with a discussion of tripartism where third parties are brought into the regulatory game, and then I'll conclude with some reflections of the potential difficulties of implementing responsive regulation. Now I indicated in that introduction that responsive regulation developed in response to debates about command and control, so at this point it would be good to explain what I mean by command and control. And as the PowerPoint indicates, command and control is the deliberate attempt by the state to influence socially available behaviour which might have adverse effects by establishing, monitoring and enforcing legal rules. And the two key ideas there are the state is involved and the state's key instrument is the use of legal rules. Now a responsive regulation was to a large extent a response to some issues that had arisen out of command and control regulation. So for example, those who wanted stronger command and control regulation were arguing that command and control wasn't properly implemented by the state, there wasn't enough enforcement, penalties weren't high enough, and as a result command and control regulation was ineffective for their purposes. Against that were the proponents of deregulation who argued that command and control regulation was stifling initiative, it involved too much red tape, and generally it had a bad impact on business activity. And then there was a third group that argued that really social life was just far too complex to be regulated by a blunt instrument like command and control regulation, so that really sets the tone and the space for the debate about responsive regulation. Now the key player in responsive regulation is John Braithwaite, and I'm giving this talk in Canberra, and John works just down the road at the Australian National University. And it started with an observation about a policy dynamic. So it starts off with an empirical observation about how things work best, and then over time it's theorised. And there's a larger debate involving lots of academics and policy people. So I just want to talk briefly about what underpins responsive regulation, if the theory is underpinning it. And the first thing is microeconomic game theory. Now that may not be a term familiar to most of you, but let me talk about it briefly. Game theory really examines how intelligent individuals interact with each other to achieve their goals. And probably the best example of game theory is the so-called prisoner's dilemma. And that's a situation where the two players are prisoners, they've been arrested for a crime, and they're placed in separate cells, and they're involved in negotiations with the police. But whether they plead guilty, or whether they fight the offence. And obviously for some prisoners, if they confess and testify against the other prisoner, they're let off for the crime, and the other prisoner gets a very heavy sentence. If they both agree to confess, they'll both be convicted, but with lower penalties. And if one of them fights the charge of the other, and if both of them fight the charges, then they might get off, but they might be convicted and face very high penalties. And so game theorists play around with those notions and explore how they work under different circumstances. Now you might be wondering how that applies to regulation. And in regulatory theory, and if you read Areson Braithway's very famous book about responsive regulation, you'll see lots of discussion of game theory in the prisoner's dilemma, but in the context of a firm and a regulator. And Areson particularly explores the way that regulators and firms can play off against each other in relation to cooperation and breaking away from cooperation. So that's the first underpinning theory. The second is responsive regulation is underpinned to a large extent by John Braithway's extensive empirical research and reading in criminology, sociology, political science and psychology. So it's very much an interdisciplinary, multidisciplinary exercise. And thirdly underpinning responsive regulation is the notion of civic republicism. And that envisages a mixed institutional order where the state and associations or different institutions counterbalance the power of others by surveillance and by exercising their own power. So as the PowerPoint shows, each exercises a countervailing power over others and checks the great dangers of where one party, one institutional order is stronger than another. Another crucial aspect is direct citizen participation where citizens involve themselves in various forms. It can be politically, it can be as a player in the market, it can be as a member of a public interest group or in any other sense. And the whole idea of responsive regulation is to merge two ideas. The first is state regulation and the second is private facets of regulation where individuals and groups privately regulate particular orders. And the great strength and the great insight from responsive regulation is the way that the public and the private interface and the way that the state steers private regulation. OK, now let me move to the key principles of responsive regulation. The first thing to say about responsive regulation is that it's distinguished by what triggers a regulatory response and what the regulatory response will be in any circumstance. In other words, it's a very flexible process. The whole idea is that regulators look at the context and determine in the context which is the best balance of regulatory approaches. And there are two really key ideas that you need to understand to properly understand responsive regulation. The first is the notion of regulatory delegation and the second is the notion of monitoring that regulatory delegation with an escalating intervention by the state. So let me go through those two key ideas a bit more slowly. Firstly, a responsive regulation involves regulatory delegation of regulatory functions to private actors. And these private actors can be public interest groups, trade unions for example, can be industry associations, can be firms, individual firms or could be independent professionals. And the whole idea of delegating regulatory functions is to try and harmonise the state's regulatory objectives with the laissez-faire notions of market efficiency. And it's not hard to see that that's an important aspect of regulation that fits in well with some of the other themes of Safe Work Month got to do with productivity and sustainability and leadership. So that's the first aspect, regulatory delegation. The second aspect is monitoring that regulatory delegation by escalating state intervention. And the most famous examples, as I mentioned earlier, of this escalated state intervention is the enforcement pyramid, which I'll deal with in a moment, and also the pyramid of regulatory strategies, which is my third example. So the exact form of regulation, the exact form of the balance between these two key principles depends on context. It depends on the industry, it'll work best, it'll work in different ways in different industries, it depends on the regulatory culture, it depends on the history of regulation in the particular industry, it depends on the motivations of the actors and it depends just on how well they are self-regulating. OK, now let me move to my first example, and that's the example of enforced self-regulation. Now, I've done a very brave thing here because I've gone against the order of the discussion in the very famous Responsive Regulation book by Ares and Brathwaite, and that's because I'm trying to break out and be a bit of an individual, but I also think it's easier to start with an example of delegated regulatory functions because I think it makes it easier to understand the richness of Responsive Regulation. So this is an example of regulatory delegation and the monitoring of that delegation. And it's a response to arguments that the costs and red tape and inflexibility of command and control is stifling initiative and stifling firm's ability to regulate themselves in response to their obligations, but it's also a response to the risks of leaving firms to regulate themselves. Everybody's very awkward with the fact that self-regulation may lead to intolerable laxity and failure by firms to comply with regulatory objectives, so you have this notion of self-regulation but enforced by the state. Now, how does this work? Firstly, the big idea is that the regulator and firms agree that firms will draft and then adhere to their own rules that meet the regulatory standards that the state would like to have met. So the firm, in a sense, is a self-regulator. The regulator indicates the standards that need to be met. They can do that either by setting a criteria or they can set default standards and indicate to firms that they can particularise those criteria or try and meet those default standards but in a different way or a better way. So the firm tailors rules to meet its own circumstances, so the rules will be different across firms but they will all be higher than the basic regulatory standard. And then the firm's responsibility is to monitor compliance with those rules and at the same time, if breaches are found, to deal with those breaches and to comply. What's the state's role? What's the regulator's role? The regulator's first role, of course, is to set the criteria, set the default standards. Its principal function after that is to approve the rules. So the rules need to be submitted to the regulator. The regulator can approve or can require amendments. The third thing that the state does is ensure that the process of self-monitoring by the firm is rigorous and done by an independent, at least there's some independence in that monitoring group. Where small firms are involved, the state may have to undertake most of the monitoring. It may be that small firms don't have the capacity to self-regulate in that sense. And of course, as enforced self-regulation suggests, the key role of the state is to enforce breaches of the rules where they are detected. Now, where do we find examples of those? Well, we find examples of enforced self-regulation right through work health and safety regulation. Probably the best and purest example is in relation to major hazard facilities under part 10 of the Work Health and Safety Regulation. And their major hazard facility operator must be licensed. And what do they have to do to be licensed? They have to introduce a safety case after consultation with their workers. And that safety case has to be submitted to the regulator and to be licensed. The safety case must be approved. So there's a classic case of enforced self-regulation as in breath weight style. Other examples are found in mining. For example, in New South Wales and Queensland under the mining health and safety legislation, mine operators are required to develop safety and health management systems in consultation with workers. Those systems are there to meet the requirements to reduce or to eliminate or at least minimise hazards as far as reasonably practicable. Those safety and health management systems are scrutinised, monitored, examined by safety, site safety and health representatives and industry health and safety representatives. Those are worker representatives and also scrutinised by inspectors whenever they visit workplaces. So you'll notice there's a slight difference in that model from the model that are posited earlier and that is that the inspectorate doesn't approve health and safety management systems but they're scrutinised closely by worker representatives and by the regulator. So the third example is actually to be found in the mainstream health and safety legislation. The Work Health and Safety Act in most jurisdictions and there section 19 in the harmonised legislation sets out a duty of care and the duty of care delegates management decisions about how to best manage health and safety to the person conducting the business or undertaking. So the regulator could have set out very detailed standards saying exactly what has to happen but the regulator recognises that it's better to leave to firms who know best their circumstances and who know best the hazards facing them in the industry to regulate themselves. So as most of you I hope will know section 19 requires PCB use to ensure the health and safety of their workers but it doesn't specify in detail how that has to be done. So it's up to the firm to work out ways of identifying hazards, setting the risks and then controlling those risks. Now that's a difficult job, most people will know that that's difficult to do so the state plays a secondary role in providing guidance in the form of regulations and in the form of codes of practice. And they indicate how particular hazards should be managed and what processes should be followed. But the PCBU doesn't do this alone, the PCBU has to manage health and safety in consultation with worker representatives, health and safety representatives and where a PCBU is involved in activity with other PCBUs has to manage health and safety in consultation with other PCBUs. And this is a classic example of enforced self-regulation, delegated responsibility to the firm but surveillance by a number of other parties including the state. So enforcement can take place here by health and safety representatives issuing a provision improvement notice or prohibition notice or by the state stepping in and using one of the enforcement methods that I'll discuss in a few moments when we talk about the enforcement permit. The fourth example of enforced self-regulation is the enforceable undertaking. This is an Australian invention first appearing in the trade practices and consumer area but now found in the model health and safety legislation in Part 11 of the Model Work Health and Safety Act. And essentially enforceable undertakings are promises made by the firm usually in a situation where the firm has committed a contravention of the legislation and is being investigated by the regulator. And if the promise or the undertaking is accepted by the regulator because it meets the regulator's criteria of an enforceable undertaking then the firm is committed to carry out whatever has been promised in the enforceable undertaking. And usually it's a bit more than just comply with the obligation that it contravened and you would hope that that would be the case. So often enforceable undertaking includes activities that involve the industry for the benefit of the particular industry so it could be developing training in industry, it could be developing a code of practice for the industry or model guidelines or something like that. And there are a whole raft of things that you can find in enforceable undertakings that you won't find that are beyond what a regulator can do because the enforceable undertaking can include things that don't fall within the regulator's powers. Now the beauty of the enforceable undertaking is that if the firm reaches the undertaking they can be prosecuted for the initial contravention and they can be prosecuted for failing to comply with their undertaking. Regulatory functions are delegated to the firm and when there's a breach of those functions the state can step in and enforce. So each of those four examples enables the firm to tailor its rules to its own circumstances and the implementation of those rules is monitored by the state in the form of the regulator but also in many circumstances by worker representatives, health and safety representatives. Okay, so that's the first example. Now there are a couple of issues that arise out of this and you'll have noticed that only in one of the instances I've given you does the regulator actually approve the rules. And that's because it's argued that that's a costly process and it takes a lot of regulator resources. Aeism Braithwaite in their optimistic way suggests that over time regulators will become more practised and skillful at this and will have to devote fewer resources but it's interesting that the only approvals we find in health and safety legislation are firstly in relation to major hazard facilities where the hazards are extremely high and secondly there are relatively few facilities and the other is in relation to enforceable undertakings where a firm has already contravened legislation so there has to be approval. But whatever the case is rules are being scrutinised by workers and their representatives and ultimately by the state. So let me move on to the second example and that's the example of the enforcement permit and this is a broader example or one example of the second principle I talked about earlier this notion of escalating state intervention in relation in a process of monitoring and checking on the activities of firms to whom regulatory tasks have been delegated. So the enforcement permit came about because of a very tired and longstanding debate between people who argued that the regulator's job in health and safety enforcement is to advise and persuade whenever a contravention was detected and those who argued that no it was a breach of law and therefore the state's role, the regulator's role was to step in and prosecute. And this debate's been going on since about 1833 in the UK and has been going on ever since the Australian legislation was introduced in the late 19th century, early 20th century and the problem with both of those approaches is that if you take the approach of excessive punishment if you reckon that every single contravention should be prosecuted what happens is that firms who are trying to do the right thing who are motivated to comply and breach legislation are likely to be demotivated, likely to become resistant to regulation because they feel they're on the right track and that the punishment is excessive if on the other hand you only advise and persuade the result can be intolerable laxity and low levels of compliance. Areson Braithwaite, particularly John Braithwaite noticed that really master regulators were adopting a different kind of approach and adopting the strengths of both of each of the advice approach and the punish approach to cover up the weaknesses of the other approaches. So what emerges is a regulatory dynamic which revolves around the notion of a hierarchy of sanctions or what we call as a pyramid. So the argument is that you'll get optimal compliance when you have an enforcement pyramid where you've got very strong sanctions at the top and more advice persuasive type sanctions at the bottom. And here's an example. This isn't actually a mainstream health and safety regulation but it's an example that John Braithwaite uses in a very good article in the 2011 University of British Columbia Law Review in relation to Transport Authority. And you'll see there on the left hand side is on the pyramid is an arrow showing the attitude to compliance. So at the bottom you've got firms that are fully compliant and at the top you've got a firm that's seriously engaged from the regulator. And if you look on the right hand side of the pyramid you'll see that the bottom, the firm, the regulator adopts strategies like maintaining awareness of health and safety, about educating, counselling and at the top are much stronger enforcement approaches like prosecution. And you'll see that each of those approaches is tailored to the compliance response on the other side. People watching this will probably be more familiar with the National Work Health and Safety Enforcement and Compliance Policy which is now on the PowerPoint. And at the top you'll see strong court sanctions at the bottom you'll see advice and persuasion methods which are labelled encouraging and assisting compliance and in the middle are sanctions or measures such as improvement notices, prohibition notices which are directing compliance. And the whole idea of the pyramid is that the regulator begins at the bottom assuming cooperation, assuming virtue but when this assumption is not met or alternatively when the firm exploits this cooperative strategy then the regulator escalates and adopts a stronger enforcement posture first using measures like improvement and prohibition notices but if that doesn't work escalating to higher enforcement approaches. So what are the key principles guiding the use of the pyramid? The first big idea is that optimal compliance that is cooperative compliance at the very bottom is most likely when the regulator displays an explicit enforcement pyramid with a wide range of enforcement options so that there are a wide range of possible responses to the compliance posture adopted by the firm. And it's important that there be a large number of enforcement measures because it's important that the regulator doesn't adopt the wrong approach so if there are a limited number of enforcement measures the regulator may find it difficult to choose the appropriate response which might lead either to lack of effect on the firm but worse by overshooting and demotivating the firm and leading to resistance. So that's why there needs to be a large number of very nuanced sanctions because otherwise the regulator is going to get it wrong and it's not going to have appropriate choices. The second big idea is that when does the regulator use these sanctions or how does the regulator decide? The regulator decides by being responsive to how effectively corporations or firms are regulating themselves. So whether or not to escalate depends on the compliance posture of the firm and how well in particular the firm is regulating itself and why do I use that term regulating itself because we saw from the earlier example that the health and safety legislation is largely about delegating regulatory functions to the firm. And the third big idea is that there's a real trick to responsive enforcement and there's a synergy between punishment and persuasion. So why does persuasion work? Persuasion will work because it's underwritten by the possibility of punishment. Why is punishment legitimate? Because it's legitimised by the underpinning posture of advice and persuasion and cooperation and the two work together in synergy. And writers like Nielsen and Parker have commented that the other beauty of the enforcement pyramid is that by leading firms into a more cooperative approach and a more compliant attitude you're more likely to get a long-term and sustainable compliance approach. You're more likely to get to a nice kind of equilibrium at the bottom of the pyramid where there's ongoing sustained compliance rather than a battle between the regulator and the firm. Now that's all fairly complicated but what makes it even more complicated is if you follow the development of responsive enforcement over time you'll see that in particular John Brathwaith's approach to responsive enforcement has changed really in line with his developing interest or highly developed interest in restorative justice. So those old timers like me who grew up reading the 1992 responsive regulation book with Ian Ayres would have noticed in chapter 2 that responsive enforcement is largely built around the notion of tit for tat and that comes out of game theories I mentioned earlier. Examining or theorising or modelling what happens when a regulator adopts a cooperative approach but the firm breaks away from cooperation and starts breaching legislation what's the ideal response of the firm? And the tit for tat argument is that the regulator starts with this assumption of virtue starts with a cooperative approach everything's fine if the firm is cooperative and complying but if the firm doesn't comply then the regulator escalates its response at the permit and as soon as the firm begins to comply then the regulator drops back again but if the firm doesn't comply and is fairly intransigent in non-compliance then the regulator escalates further but what you notice is that the regulator is watching closely what the firm does and is responding to the firm's approach to cooperation and to compliance and as Neilson and Parker point out that the regulator's approach in other words the level of formality it adopts and the level of coerciveness it adopts and by formality I mean how literally the regulator is interpreting the legal rule that's being complied with and how formal it is about compliance and coercive of course is the level of the hierarchy that the regulator is working at those are all matched to the firm's response at the previous stage of the tit-for-tat approach now the later restorative formulation is quite different what's crucial to know about tit-for-tat is that the it's important that the regulator and that the field staff involved in regulation threaten escalation as part of the transaction the later responsive restorative justice formulation involves the regulator that's the field staff the inspectors engaging face-to-face with duty holders making minimal use of formalistic and coercive approaches in other words they signal that they prefer to take a cooperative approach they signal that their preference is for capacity building and cooperation and they never threaten escalation that's a major difference in the restorative justice approach the field staff never threaten escalation they believe that cooperation kindness and respectfulness on their part leads to the same attitude on the part of the duty holder the firm and this leads to cooperation by the firm and better compliance and in fact where there is compliance there is a pyramid of rewards so at the bottom of the pyramid of rewards the regulator of firms the compliance supports it provides further education and can escalate to praise can escalate to positive recognition by spreading word of the approach that the firm has taken and at the very top of that pyramid of rewards can nominate the firm for a prize a health and safety award and so on the other crucial difference between the restorative justice approach and the tit for tat approach is that it's the legal system and the enforcement system itself that threatens the firm with punishment and escalation it's not the field staff dealing face to face with the firm so in a sense escalation sits further in the background than it would under the tit for tat model and in a sense the field staff are saying we're the good guys we're helping you comply if it doesn't work out others are going to take over and come over the top of us and the system itself will implement the more coercive and formalistic enforcement approaches now just two observations before I move on about the enforcement pyramid the first is as we've seen from the national compliance enforcement policy there does seem to be an enforcement hierarchy as part of the approach of most regulators and certainly if you map the aggregate statistics about enforcement you'll see that most enforcement activity is at the bottom of that pyramid and then the use of improvement of prohibition notices is slightly less than advice and persuasion activities at the bottom and prosecution and enforceable undertakings there are fewer in number than you find improvements in prohibition notices if you map that in the aggregate you actually do get a pyramid and that's used as justification for saying that Australian regulators do follow the enforcement pyramid and the thing with that is that empirically it's very rare to see genuine tit for tat in other words multi-transactional approaches to enforcement and as I'm going to foreshadow later one of the reasons for that is that most regulators just don't have the resources to play tit for tat with duty holders so I've in a sense labelled that response of enforcement light it's not quite tit for tat it's a sense of approach in the sense of adopting a proportional response to the level of compliance the second problem with the enforcement pyramid is a little more complex and that is that if you look at the enforcement statistics you'll see that prosecution is generally only taken where there's a serious injury or a fatality in other words when there's a serious injury or fatality the regulator jumps to the top of the pyramid when there isn't the regulator generally plays the bottom half of the pyramid might go up to an infringement notice or an improvement notice or a prohibition notice so in a sense the pyramid splits it stops halfway when there's not a serious injury or fatality and we go straight to the top when there is and I hope you'll see that one of the problems with that is that the regulator's not getting the full benefit of the pyramid because people know that the regulator won't go to the top of the pyramid and something really bad goes wrong ok so that's the more famous example of the pyramid let me move to the less famous example of the pyramid but equally interesting and that's the pyramid of regulatory strategies and again the key ideas here are regulatory delegation and escalating forms of government regulation but instead of it being pitched at the level of the firm it's pitched at the level of the entire industry and the idea is that governments would like their regulatory strategies to take place at the bottom of a pyramid of regulatory strategies where self-regulation is the key idea now why self-regulation good from a regulator's perspective well you don't need to draw up detailed rules you don't need to consult widely and what the codes of practice and the regulation should be and you don't have to spend a lot of money on enforcement staff you just leave it to firms to get on and deal with the broad principles and the broad objectives of regulation from a firm's perspective self-regulation is ideal because they don't have to spend money deciphering what the regulatory standard requires and instead they can get on determining their own approaches to compliance most of us are a little uneasy with that idea because we may not have the faith and belief in the intrinsic goodness of humankind to get on and comply with broad regulatory objectives so that's where the second idea comes in the idea of escalating government intervention so the if a regulator starts with the idea that self-regulation is the ideal approach it then indicates its willingness to escalate up the regulatory strategies permit of interventionism to stronger and more traditional forms of regulation so for example what you might find is within a particular industry self-regulation being the original approach but over time when there's clear non-compliance with the broad objectives of self-regulation the enforcement, the regulatory strategy moves up to enforced self-regulation if that doesn't work we move up the permit of regulatory strategies to command and control the notion I discussed earlier but with a discretionary approach so that the regulator can decide in particular instances whether to prosecute or whether to use less strategies but if that doesn't work we move up the permit of regulatory hierarchies to command and control with no discretion so the state has to prosecute you can play around with that permit you can use other approaches like licensing and taxing harm and so on but the idea, see the idea is fairly clear now of course in health and safety we're very reluctant to start at the bottom and in a sense to enforce self-regulation model but and the debate really is about how serious the sanction should be now that introduces the next important notion that underpins both of the pyramids that I've just discussed and this is the notion of the benign big gun and you'll find discussion of this in Chapter 2 of Ares and Braithwaith's book so at the heart of responsive regulation and particularly the two pyramids I've talked about the hierarchy of sanctions and the hierarchy of regulatory strategies is a paradox and the paradox is that the greater the image of invincibility of the regulator and the greater its capacity to escalate to the top of the hierarchy either of sanctions or of regulatory strategies and the tougher the sanctions at the top the more likely firms are or the industry in the case of strategies the more likely there is to be participation in cooperative compliance at the bottom so the tougher the sanctions at the top and the more likely it is that the regulator will move to the top of the pyramid the more likely it is that compliance will take place at the bottom so both hierarchies work best if they're tall and I've explained earlier what I mean by that but lots of sanctions a range of sanctions all carefully nuanced to different levels of compliance and if they're super punishments at the top now what's interesting about super punishments is most people will know that the model health and safety legislation now has its maximum penalty for a corporation three million dollars ten years ago in a book of essays John Braithwaith discussed restorative justice in health and safety and talked about restorative justice playing at the bottom of enforcement pyramid and at the top you have significant mega penalties and the kinds of penalties he was talking about were penalties of a hundred million dollars for contraventions but major discounts were a firm had a robust approach to systematic health and safety management so when we talk about large penalties at the top we're talking about significantly greater penalties that we currently find in the health and safety legislation okay time to move on to example four tripartism and to introduce this properly we need to move back to the original idea of civic republicanism and there were two key ideas that I was trying to get across at that point the one was in the sense of institutions checking on each other and counter balancing the exercise of power by other institutions this notion that there should be checks and balances in the system and institutions should have the power to check and to counter veil abuse of power by other parties and the second was participation of citizens two key ideas and these come together in Ares and Braithwaith's civic republican notion of tripartism and their argument is that so far we've discussed regulation as a game between two players we've talked almost exclusively about the regulator and the firm and tripartism as the name suggests introduces the third player in the regulatory game so a responsive regulation can be improved and capture and corruption prevented these are the two great fears in the model we've talked about capture is when the regulator gets a bit too close to the firm now we want the regulator to be close to the firm because we've talked about cooperation so in a sense cooperation is good capture what we're trying to prevent here is bad capture and corruption probably doesn't need much explanation so how do we check against capture or corruption and we do that by empowering public interest groups and we also do it by promoting collaboration, dialogue and trust building government where there's a system of checks and balances so the third party the private interests come into the regulatory game and check on the public regulatory approach taken by the public regulator and so this is Ares and Braithwaith's idea that private interests can be harnessed for the public good so public interest groups become fully fledged third player and can directly take action against the firm and can take action against the regulator where the regulator doesn't enforce or is corrupted or is harmfully captured so under the Ares and Braithwaith's tripartist model the public interest groups have access to all information that's available to the regulator they have a seat at the negotiation table when there are deals done between firms and regulators and they have the same capacity to sue or to bring prosecutions as the regulator does now that may sound like something from Pluto but let me give an example using the work health and safety statutes so in part five of the work health and safety the model work health and the harmonized work health and safety statutes you'll know that workers can elect worker health and safety representatives these representatives have a range of powers some of the powers include getting information about health and safety so there's a tick on the first on the first item there, the first tick secondly inspectors need to cooperate with health and safety representatives they have to consult with health and safety representatives and report to health and safety representatives the kinds of issues that they're finding at the workplace and thirdly health and safety representatives can issue provision improvement notices and can issue and can direct the dangerous work seats well they can except in my home state of Queensland in a sense ideally they would also have the right to prosecute people will know particularly New South Wales people will know that there is a very limited right for a trade union to a secretary to prosecute for a category one or a category two offence in New South Wales but it's a long and convoluted and very difficult to implement strategy but ideally we could have a private enforcement hierarchy if we had stronger sanctions at the top and a right to prosecute and that would be following the years in Brathwaite model that I've outlined here now the book response of regulation was written in 1992 and Peter Graboski a long time collaborator of John Brathwaite very recently wrote a very interesting article and where he talked about the way that the world has changed since since 1992 which will come as a shock to all of us many things have happened firstly there's been a weakening of the state regulatory activities partly because governments don't have the revenues that they used to have and there's great a call on their resources secondly some states might be some countries might be scared to antagonise capital and thirdly many governments don't have a philosophy of reducing government's invention so you can discern a trend for a weakening of state or withdrawal of the state from its regulatory activities the second development is there's been an increase in the number and the type of non-government actors in the regulatory process one example is the power of retailers large retailers establishing supply chains have extensive powers to control the quality of the product in the supply chain the use of resources in the supply chain and the use and the working conditions in the supply chain and in a sense this has been recognised in a number of areas of regulation but most most healthfully the clothing footwear and textile industry their regulatory provisions to try and harness the power of retailers and those high in the supply chain and requiring them to ensure health and safety and the payment of wages to workers at the bottom and the third development is developments in digital technology and the possibilities of what Roboski calls wiki regulation without government mediation so more and more private individuals using smart phones and using Google Earth and all sorts of things can monitor non-compliance by corporations and what's more frightening for we old people they can communicate very quickly with other people through social through social media and so it's very easy now to monitor prices in supermarkets it's very easy now to track where waste is being done it's very easy now to track animal cruelty in abattoirs all over the world and this has had a profound impact on the way that regulation can take place so in other words there's a radical increase in the types of private actors to whom regulatory activities can be delegated or who will in fact undertake regulatory activities even if those activities aren't delegated to them now that's a moment of optimism but we must always remember as many theorists point out that we shouldn't get too excited about the possibility of private actors not being involved in regulatory failure we're all sceptical about governments and regulation but commentators warn us or not to get too carried away with private regulation and the possibility of private regulatory failures is always is always good but it is worth thinking about in discussions about responsive regulation ways of harnessing players outside the players that we've traditionally considered in health and safety and let me just end with discussion of the potential difficulties of responsive regulation and these difficulties really the ones I'm going to raise are really in relation to the enforcement permit and one we've already touched on do regulators have enough resources to work their way up and down the permit and I'll leave that as a question but in a sense we answered that earlier the second is just more of a conceptual issue or skills issue for responsive enforcement to work really well you need a regulator that's able to determine the compliance posture of the firm really understands systematic approaches to health and safety management really understands compliance programs and so on and that of course is a tall order that's in no way belittling the qualities of health and safety inspectors it's just saying it's a really difficult job and you also need firms that are able to pick up signals from regulators and fully understand what a regulator is doing and in a recent publication has noted ambivalence and ambiguity characterises most regulatory transactions and so there's not always the clarity of communication and the other problem with big firms of course big organisations is who's the regulator communicating with and is that communication getting to the key decision makers in the firm critics on the left are very skeptical about the capacity of business organisations to put concerns for health and safety ahead of concerns for profitability and production people like Steve Terms and Dave White are very skeptical about the presumption of virtue and starting at the bottom of the pyramid and the same authors and others argue that particularly when you look at the UK experience of enforcement there's a clear trend to reduce enforcement resources and there's a clear trend to reduce enforcement activity and this coupled with risk based strategies feeds easily into debates about responsive regulation but leaning a bit too closely to the advice and persuade and the bottom of the pyramid activity rather than the top so there are risks of in a sense responsive regulation being captured by more conservative debates and debates where enforcement doesn't take such a high priority so let me conclude there the points I've been trying to make is that responsive regulation is developed in response to clear weaknesses in the command control model that responsive regulation provides really exciting opportunities for very smart regulation for nuanced regulation but of course they're great dangers from lack of resources and also because of the inherent problem in health and safety of a conflict between health and safety and production and profit but thank you very much for attending


My name's Katie Empennius. And I'm Addy Osmani. We work on the Chrome team on trying to keep the web fast. Today, we're going to talk about a few web performance tips and tricks from real production sites. But first, let's talk about buttons. Now, you've probably had to cross the street at some point and may have had to press a pedestrian beg button before. Now, there are three types of people in the world. There are people who press the button once. There are people who don't press the button. And then people who press it 100 times because, of course, that makes it go faster. The frequency of pushing these buttons increases proportionally the user's level of frustration. Want to know a secret? Sure. At least in New York, most of these buttons aren't even hooked up. So your new goal is to have a better time to interact with them than this. Now, this experience of feeling frustrated with buttons that's not working is actually something that applies to the web as well. According to a UX study that was done by Akamai in 2018, users expect experiences to be interactive in about 1.3 times the point when they're visually ready. And if they're not, people end up rage-clicking. Right. It's important for sites to be visually ready and interactive. It's an area where we still have a lot of work to do. Here, we can see page weight percentiles on the web, both overall and by resource type. If one of these categories is particularly high for a site, it typically indicates that there's room for optimization. And in case you're wondering what this looks like visually, it looks a little bit like this. You're sending just way too many resources down to the browser. Delightful user experiences can be found across the world. So today, we're going to deep dive into performance learnings from some of the world's largest brands. Let's start by talking about how sites approach performance. This probably looks familiar. For many sites, maintaining performance is just as difficult, if not more difficult, than getting fast in the first place. In fact, an internal study done by Google found that 40% of large brands regress on performance after six months. One of the best ways to prevent this from happening is through performance budgets. Performance budgets set standards for the performance of your site. Just like how you might commit to delivering a certain level of uptime to your users, you can commit to delivering a certain level of performance. There are a couple different ways that performance budgets can be defined. They can be based on time. For example, having a budget of having less than a two-second time to interactive on 4G. They can be based on page resources. For example, having less than 150 kilobytes of JavaScript on a page. Or they can be based on computing metrics, such as Lighthouse scores. For example, having a budget of a 90 or greater Lighthouse performance score. While there are many ways to set a performance budget, the motivation and benefits of doing so remain the same. When we talk to companies who use performance budgets, we hear the same thing over and over. They use performance budgets because it makes it easy to identify and fix performance issues before they ship. Just as tests catch code issues, performance budgets can catch performance issues. Walmart Grocery does this by running a custom job that checks the size of the builds corresponding to all PRs. If a PR changes the size of a key bundle by more than 1%, the PR automatically fails and the issue is escalated to a performance engineer. Twitter does this by running a custom build tracker that they built against all PRs. This build tracker comments on the PR with a detailed breakdown of how that PR will affect the various parts of the app. Engineers then use this information to determine whether a PR should be approved. In addition, they're working on incorporating this information into automatic checks that could potentially fail a PR. Both Walmart and Twitter use custom infrastructure that they built themselves to implement performance budgets. We realize that not everybody has the resources and time to devote to doing that, so today we're really excited to announce Light Wallet. Light Wallet adds support for performance budgets to Lighthouse. It is available today in the command line version of Lighthouse. The first and only step required to set up Lightwallet is to add a budget.json file. In this file, you'll define the budgets for your site. Once that's set up, run the newest version of Lighthouse from the command line and make sure to use the budget path flag to indicate the path to your budget file. If you've done this correctly, you'll now see a budget section within the Lighthouse report. This section will give you a breakdown of the resources on your page, and if applicable, the amount that your budgets were exceeded by. Lightwallet was officially released yesterday, but some companies have already been using it in production. Jabong is an online retailer based in India who recently went through a refactor that dropped the size of their app by 80%. They didn't want to lose these performance wins, so they decided to put performance budgets into place. Up on the screen, you can see the exact budget.json file that Jabong is using. Jabong's budgeting is based on resource sizes, but in addition to that, Lightwallet also supports resource count-based budgets. Jabong used the current size of their app as the basis for determining what their budget should be. This worked well for them because their app was already in a good place. But what if your app isn't in a good place? How should you set your budgets? Well, one way to approach this problem would be to look at HTTP archive data to see what breakdown of resources correspond with your performance goals. But speaking from personal experience, that's a lot of SQL code to write. So to save you the effort, we're making that information directly available today in what we're calling the performance budget calculator. Simply put, the performance budget calculator allows you to forecast time to interactive based on the breakdown of resources on your page. In addition, it can also generate a budget.json file for you. For example, a site with 100 kilobytes of JavaScript and 300 kilobytes of other resources typically has a four second time to interactive. And for every additional 100 kilobytes of JavaScript, that time to interactive increases by one second. No two sites are alike. So in addition to providing an estimate, the calculator also provides a time to interactive range. This range represents the 25th to 75th percentile TTI for similar sites. So one of the things that can end up impacting your budgets are images.  Now, we currently send down a lot of images to our pages. And these aren't the best for limited data plans or particularly slow network connections. At the 90th percentile, HP Archive says that we're shipping almost five megs worth of images down on mobile and desktop. And that's not perhaps the best. Now, lazy loading is a strategy of loading resources as they're needed. And this applies really well to things like off-screen images. There's a really big opportunity here. Once again, looking at HP Archive, we can see that there's actually an opportunity where at the 90th percentile, folks are currently shipping down anywhere up to three megabytes of images that could be lazy loaded and at the median 416 kilobytes.  Now, the way that these usually work is that you specify a data source instead of a source as well as a class. And then the library will upgrade your data source to a source as soon as you come into view. Now, you can build on this with patterns like optimizing perceived performance and minimizing reflow just to let your users know that something's happening as these images are being fetched. Now, we're going to walk through some case studies of people who've been able to use lazy loading effectively. So Chrome.com is our browser consumer site. And recently, we've been very focused on optimizing its performance. We'll cover some of those techniques in more depth soon. But these resulted in a 20% improvement in page load times on mobile and a 26% improvement on desktop. Lazy loading was one of the techniques the team used to get to this place. They use an SVG placeholder with image dimensions specified to avoid reflow. They're using intersection observer to tell when images are in or near the viewport and a small custom JavaScript lazy loading implementation. The win here was 46% fewer image bytes on initial page load, which was a nice win. We can also look at more advanced uses of image lazy loading. So here's Shopee. Shopee were a large e-commerce player in Southeast Asia. Recently, they adopted image lazy loading. And we're able to save one megabyte of fewer images that they're serving on initial load. Now, the way that Shopee works is that they're displaying a placeholder by default here. And when the image is inside the viewport, once again, using intersection observer, they're able to trigger a network call for the image to download it in the background. Once the image is either decoded if a browser supports the image decode API or downloaded if it doesn't, the image tag is rendered. And they're able to do things like have a nice fade-in animation when that image appears, which overall looks quite pleasant. We can also take a look at Netflix. So as Netflix's catalog of films grows, it can become challenging for them to present their members with enough information to decide what to watch. So they had this goal of creating a rich, enjoyable video preview experience so members could have a deeper idea of what was on offer. Now, as part of this, Netflix wanted to optimize their home page to reduce CPU load and network traffic to keep the UX intuitive. The technical goal was to enable fast vertical scrolling through 30 plus rows of titles. The old version of their home page would render all of the tiles at the highest priority. That would include data fetching from the server, creating all of the DOM, fetching all of their images. And they wanted the new version to load much faster, minimize memory overhead, and enable smoother playback. So here's where they ended up. When the page now loads, they first render billboard images at the very top three rows on the server. Once they're on the client, they make a call for the rest of the page, and they render the rest of the rows and then load all the images in. So they're effectively simply rendering the first three rows of DOM and laser loading the rest as needed. The impact of this was decreased load time for members who don't scroll quite as far. And this is effectively a summary of where they ended up. Overall, faster startup times for video previews and full screen playback. So before, there was a CPU load required to generate all of their DOM nodes to get images to load. Now, they don't saturate quite as much member bandwidth, and they pull in four times fewer images on initial load. So their video previews now have faster load times. They've got less bandwidth consumption and lower memory overall. So from our tests, image laser loading has helped many brands shave an average of 70% percent off of their image bytes on initial load as a result of using this optimization. These include the likes of Spotify and Target. So it looks like there could be something here we could bring into the platform. So today, we're happy to announce that native image lazy loading is coming to Chrome this summer. Now, the idea here is that with just one line of code using the brand new loading attribute, you'll be able to add lazy loading to your pages. So this is a big deal. Very excited about it. This will hopefully work with three values, the lazy value, eager, if an image is not going to be lazy loaded and auto if you want to defer it to the browser. Thank you. So we're also happy to announce that this capability is also coming to iFrames. So the exact same attribute, the loading attribute, is going to be possible to use on iFrames. And I think that this introduces a huge opportunity for us to optimize how we address loading third party content. Now, here is an example of the brand new loading attribute working in practice. So what way this is going to work is that on initial load, we're actually just going to fetch the images that are in or near the viewport. We're also going to fetch the first two kilobytes of all of our images, as that will give us dimension information and help us avoid reflow and give us the placeholders that we need. And then we start loading these images on demand. And what this leads to is quite nice savings. So we're only loading out 548 kilobytes of images rather than those 2.2 megabytes.  We actually factor in the user's effective connection type when we decide what distance from viewport thresholds we're going to use. And those can be different from whether you're on 4G to whether you're on 2G. Now, the loading attribute can either be treated as a progressive enhancement, so only using it in browsers that support it.  So here, we're checking for the presence of the loading attribute on HTML image element. If it's present, we'll just use the native attribute. We'll upgrade our image data sources. And if it's not, we can fetch in something like lazy sizes and apply it to get the same behavior. So here it is working in Firefox, where we've applied this exact same pattern. And so we're able to get to a place where we have cross-browser image lazy loading with a relatively hybrid technique that works quite well. Users expect images to look good and be performant across a wide variety of devices. This is why responsive images are an important technique. Responsive images are the practice of serving multiple versions of an image so that the browser can choose the version that works best for the user's device. Responsive images can either be based on serving different widths of an image or based on different densities of an image. Density refers to the device pixel ratio or pixel density of the device that the image is intended for. For example, traditional CRT monitors have a pixel density of 1, whereas Retina displays have a pixel density of 2. However, these are only just two of the many pixel densities in use on devices today. And what Twitter realized was that it was unnecessary to serve images beyond a Retina density. This is because the human eye cannot distinguish between images beyond that density. This is an important realization because it decreased image size by 33%. The one exception to this is that they do continue to serve higher density images in situations where the image is displayed full screen and the user can pinch zoom on the image. Responsive images are just one of the many techniques that go into a fully optimized image. When we're talking with large brands, those optimizations not only include the usual suspects like compression or resizing, but also more advanced techniques like using machine learning for automated art direction or using AB testing to evaluate the effectiveness of an image. And this is where image CDNs come in. You can think of image CDNs as image optimization as a service. And they provide a level of sophistication and functionality that can often be difficult to replicate on your own with local script-based image optimization. At a high level, image CDNs work by providing you with an API for accessing and, more importantly, manipulating your images. And image CDN can be something that you manage yourself or leave to a third party. Many companies do decide to go with a third party because they find that it is a better use of resources to have their engineers focus on their core business rather than the building and maintenance of another piece of software. Trabago is a travel site based in Europe who switched to Cloudinary, and this was exactly their experience. When Trabago switched to an image CDN, they found that overall image size decreased by 80%. Those results are very good, but they're not necessarily unusual. When talking with brands who've switched to image CDNs, we found that they experience a drop in image size of anywhere from 40% to 80%. I personally think part of the reason for this is that image CDNs can often provide a level of optimization and specialization that can be difficult to replicate on your own if only due to lack of time and resources. Images are the single largest component of most websites, so this translates into a significant savings in overall page size. So next, let's talk about JavaScript. Starting off with deferring third party script and embeds, things like ads, analytics, and widgets. Now, third party code is responsible for 57% of JavaScript execution time on the web. That's a huge number. This is based on HP Archive data, and this represents a majority chunk of script execution time across the top 4 million websites. This includes everything across ads, analytics, embeds, and a lot of the CPU intensive scripts can cause issues with things like script execution and can delay your user interaction. So we need to exercise a lot of care when we're including third parties in our pages. Now, when I ask folks how their JavaScript diet is going, it usually isn't very great. Tag managers, ads, libraries, maybe there's an opportunity for us to defer some of this work to a smarter point in time. Let's talk about a site that actually did this for real, the Telegraph. So the Telegraph knew that improving the performance of third party scripts would take time, and it benefits from installing a performance culture in your organization. They say that everybody wants that tag on their page that's going to make the organization money. And it's very important to get the individuals in a room to educate, challenge, and work together on this problem. So what they did was they set up a web proof working group across their ads, marketing, and technology teams to review tags so that non-technical stakeholders could actually understand what the opportunity here was. What they discovered was a change. The single biggest improvement at the Telegraph was deferring all JavaScript, including their own, using the defer attribute. This hasn't skewed analytics or advertising based on their tests. This is a really huge deal, especially for a publisher, because usually you see a lot of hesitation from marketing folks, from advertising analytics, because there's this fear that you're going to end up losing revenue or not quite tracking as many users as you want to be able to track. But through collaboration, through building that performance culture, they were actually able to get to a place with the org where they kept building on top of this, including leading to changes such as a six-second improvement in their time to interact with. So they still have work to do, but this is a really solid start. We can also talk about Tui, who are a travel operator in Europe. They were looking at how to be more customer-centric and realized that just adjusting prices wasn't going to cut it if visitors were leaving their site because of slow speed. Now, for speed projects at their organization to get off the ground, they had to get organizational buy-in from management all the way up to their CEO. And through a test and learn mindset, they were able to discover that when low times decreased by 71%, bounce rates decreased by 31%. Now, part of the things that allowed them to get to a place where they could improve performance were these two optimizations. Tui were using Google Tag Manager in the document head. In their case, we're using it to inject tracking scripts and things like that. So they moved the execution of Google Tag Manager after the load event. They didn't see any drop in tracking, a meaningful level as a result of this. And the result was great in their perspective. They have 50% reduction in DOM complete. Tui also had a third-party ABE testing library that they were using that weighed 100 kilobytes of GZIP and Minivite script. They realized that even if they were to push this to after the onload event, it could potentially have some issues. They noticed some flickering as it would switch between one ABE test to the other. So they completely threw that dependency out. And they rewrote their ABE testing as something custom, part of their CMS, in under 100 lines of JavaScript. The impact was being able to throw away that dependency and a 15% reduction in home-painting JavaScript. Let's also talk about embeds. Now, we noticed LighthouseFlagsChrome.com is having a high JavaScript execution time, despite it looking like it's mostly a static site. This would delay how soon users could interact with the experience. Now, what we saw was that Chrome.com actually had this Watch Video button on it, where they'd show you to promo if you clicked on the button. Unfortunately, they dropped in YouTube's default embed into their HTML. And this was pulling in all of the YouTube video player, all of its scripts and resources on initial page load, bumping up their time to interactive to 13.6 seconds. Now, the solution here was that instead of loading those YouTube embeds and their scripts eagerly on page load, switching to doing it on interaction. So now, when a user clicks to watch that video, that's the point when we load in all those resources on demand, because the user signaled an intense that they're interested in watching. This led to a 69-point improvement in their Lighthouse performance score, as well as a 10-second faster time to interactive. So a really big change. Now, no performance talk is complete without a discussion of the cost of libraries and how you should just remove all of them. But since that topic has been done so many times, I wanted to take a little bit different angle and instead talk about what are some alternatives to removing expensive libraries. In other words, if that's not an option for you, what are some other things you can look into? First is deferring or deprecating expensive libraries, so taking steps to eventually removing that library. Replacing the library with something less expensive, deferring the use of an expensive library until after the initial page load, and updating a library to a newer version. When replacing libraries, there are generally two things you want to look for. One, that the library is smaller, but also maybe more importantly, that it's tree-shakeable. By only using tree-shakeable dependencies, you're ensuring that you're only paying the cost for the parts of the library that you actually use. You can also defer the loading and use of expensive dependencies until after the initial page load. Tokopedia is an online retailer based in Indonesia, and they're using this technique on their landing page. They really wanted their initial landing page experience to be as fast as possible, so they rewrote it in spelt. The new version only takes 37 kilobytes of JavaScript to render above-the-fold content. By comparison, their existing React app is 320 kilobytes. I think this is a really interesting technique because they did not rewrite their entire app. Instead, they're still using the React app. They just lazy loaded in the background using service workers. This can be a really nice alternative to rewriting an entire application. As I mentioned, Tokopedia used spelt for their landing page. In addition to the spelt, Preact and Lit HTML are two other very lightweight frameworks to look into. And last, consider updating your dependencies. As a result of using newer technologies, newer versions of libraries are often much more performant than their predecessors. For example, Zolando is a European fashion retailer, and they notice that their particular version of React was impacting page load performance. They A-B tested this and found that by updating from React 15.61 to 16.2, they were able to improve load time by 100 milliseconds and lead to a 0.7% uplift in revenue per session. Now, another useful optimization to consider is code splitting. When we're thinking about loading routes and components, we ideally want to do three things. We want to let the user know that something is happening. We want to load the minimal code and data really fast. And we want to render as quickly as possible. Now, code splitting enables us to do this more easily by breaking our larger bundles into smaller ones that allow us to load them on demand. This enables all sorts of interesting loading patterns, including progressive bootstrapping. Now, when it comes to JavaScript, it actually does have a real cost. And those two costs are download and JavaScript execution. Download times are critical for really slow network, so things like 2G and 3G. And JavaScript execution time ends up being critical for devices with slow CPUs, because JavaScript is CPU bound. This is one of those places where small JavaScript bundles can be useful for improving your download speeds, lowering memory usage, and reducing your overall CPU costs. Now, when it comes to JavaScript, our team have a motto. If JavaScript doesn't bring users joy, thank it and throw it away. I believe that this was in an extended special of Marie Kondo's show. Now, one site that breaks up JavaScript pretty well is Google Shopping. They were interactive in under five seconds over 3G, and they have this goal of loading very, very quickly, including their project details page. Now, Shopping have at least three JavaScript chunks, one for above-the-fold rendering, one for code to respond to those user interactions, and one for other features that are supported by Search. Now, their work to get to this place involved drawing a new template compiler, producing smaller code through it, and also looking at things like a lighter experience for folks who are on the slowest of connections. They actually ship a version that's under 15 kilobytes of code for users in those types of markets. Another good example are Walmart Grocery. So Walmart Grocery is a single-page application that loads as much as possible up front. And they've been focused on cleaning up their code, removing old duplicate dependencies, anything that's unnecessary, and they split up their core JavaScript bundles using code splitting. They've also been doing things that Katie's been suggesting earlier, like moving to smaller builds of libraries like Moment.js. And the impact of this iterative work has been great, a 69% smaller JavaScript bundle and 28% smaller, faster TTI. Now, they continue to work on shaving JavaScript off their experience to improve it as much as possible. We can also talk about Twitter. So Twitter is a popular social networking site. 80% of their customers are using mobile every day. And they've been focused on unlocking a user experience for the web that lets users access content pretty quickly, regardless of their device type or their connection. Now, when Twitter Light first launched a few years ago, the team invested in many optimizations to how they load JavaScript. They used route-based code splitting and 40 on-demand chunks for breaking up those large JavaScript bundles so that users could get interactive in just a few seconds over 4G. Between this and smart usage of resource hints, they're able to prioritize loading their bundles pretty early. So what did the team focus on next after that? Well, Twitter is a global site that supports 34 languages. Now, supporting this required a tool chain of libraries and plugins for handling things like locale strings. Now, after choosing a set of open-source tools, they discovered that on every build, there were including internationalization strings in those builds that were invalidating file hashes across the entire app. Each deploy would end up with an invalidated cache for their users, and this meant that their service worker had to go and redownload everything. This is a really hard problem to solve, and they ended up actually rewriting their internationalization pipeline and revamping it. The impact of this was that it enabled code to be dropped from all of their bundles and for translation strings to be lazy loaded. The impact was 30 kilobytes of reduction in overall bundle size, and it also unlocked other optimizations, such as the emoji picker in Twitter being loaded on demand. That saves 50 kilobytes from their core bundles having to include it. The changes in their internationalization pipeline also led to an 80% improvement in JavaScript execution, so some nice wins all around. We can also take a look at JavaScript for your first-time users, so those people who are coming to your experience for the first time, looking at Spotify. So Spotify started serving their web player to users without an account, and they would show an option to sign up to play as soon as users would click on a song. For first-time users that didn't need to use their playback library or their core logic, they would actually just keep first-time page loads very, very low with just 60 kilobytes of JavaScript to get it interactive really quickly. Once users actually authenticate and they log in, they then lazy load the web player and their vendor chunk, meaning that you as a first-time user get a really quick experience and then an OK experience for the rest of your navigations. Now, Spotify recently also rewrote their web player in React and Redux, and one decision that they made was to improve performance of navigations in the player. Previously, they would load an iframe for every view, which was bad for performance. They discovered that Redux was pretty good for storing data from REST APIs in a pretty normalized shape and making use of it to start rendering as soon as a user clicks on a link. This enabled them to have quick navigations between pages, even on really slow connections, because you were reducing overall API calls. And finally, we can take a look at Jabon. So Jabon, as Katie mentioned earlier, they're a popular fashion destination in India. They decided to rewrite one of their experiences as a PWA, and to keep that experience fast, they used the purple pattern, so push, render, pre-cache, and lazy load. This allowed them to get interactive in just 18 kilobytes of JavaScript. So they were using HP Server Push. They trimmed their vendor bundles to 8 kilobytes, and their pre-caching scripts for future routes using service workers, which overall led to a TTI improvement of 82% with some good business wins off the back of it. Performance sites display text as soon as possible. In other words, they don't hide text while waiting for a web font to load. By default, browsers hide text if the corresponding font is not loaded, and the length of time that they will do this for depends on the browser. Simple to see why this is not ideal. Good news is that the fix is also simple. Wherever you declare a font face, simply add the line font display swap. This tells the browser to swap out, use the default system font initially, and then swap it out for a custom web font once it arrives. Although you do currently have to self-host web fonts to add font display to your pages, right? Yes, but we have a special announcement today. So developers have been asking us to do something with Google Fonts for about a year and a half, and today we're happy to announce that Google Fonts is still going to support font display. So you'll be able to set things like font display swap, optional, and a full set of values. We're very excited about this change, and this actually just came in like last minute, so we've got some docs. Last night, last night. Last night, so we've got some docs to update. Let's also talk about resource hints. So browsers do their best to prioritize fetching resources they think that are important, but you as an author know more about your experience than anybody else. Now, thankfully, you can use things like resource hints to get ahead of that. Here are some examples. So Barefoot is an award-winning wine business. They recently used a library called Quicklink, which is under a kilobyte in size, and what they do is they prefetch links that are in Viewport using Intersection Observer, and what they saw off the back of this was a 2.7 seconds faster TTI for future pages off the back of it. Jabon are a site that are very heavily dependent on JavaScript for their experience, so they use Linkroll Preload to preload their critical bundles, and saw a 1.5 second faster time to interact with off the back. And Chrome.com, it was originally connecting to nine different origins for their resources. They used Linkroll Preconnect and saw a 0.7 second decrease in latency off the back. What are other folks doing with prefetching? So eBay is one of the world's most popular e-commerce sites, and to help them speed up how soon users can view content, they've started to prefetch search results. So eBay now prefetch the top five items on a search result page for faster subsequent loads. This led to an improvement of 759 milliseconds for a custom metric called above the full time. It's a lot like first meaningful paint. eBay shared that they're already seeing a positive impact on conversions through prefetching. The way that this works is effectively doing their prefetching after a request out of callback, so once the page kind of settles. And this is rolling out to a few different regions right now. It's shipped to eBay Australia, and it's coming soon to the US and UK. Now as part of eBay's site speed initiative, they're also doing predictive prefetching of static assets. So if you're on the home page, it'll fetch the assets for the search page. If you're on the search page, it'll do it for the item page and so on. Right now the way that they're doing predictive prefetching is a little bit static, where eBay are excited to experiment with how to use machine learning and analytics in order to do this a little bit more smartly. Now another site that's using a very similar technique to this is Virgilio Sports. They're a sports news website by Atalia, and they've been improving the performance of their core journeys. They actually track impressions and clicks from users who are navigating around the experience, and they're actually able to use link rel prefetch and service workers to prefetch the most clicked article URLs. That every seven minutes their service workers will go and fetch the top articles picked by their algorithms, except if you're on a slow 2G or 2G connection. The impact of this was a 78% faster article fetch time, and they've also seen that article impressions have been on the rise too. After just three weeks of using this optimization, they saw a 45% increase in article impressions. Critical CSS is CSS necessary to render above the fold content. It should be inlined and that initial document that is inlined in should be delivered in under 14 kilobytes. This allows the browser to render content to the user as soon as the first packet arrives. In particular, Critical CSS tends to have a large impact on first contentful paint. For example, 2E is a European travel site, and they were able to improve their first contentful paint by 1.4 seconds down to 1 second by inlining their CSS. The K is another site using Critical CSS. They're a large Japanese newspaper publisher, and one of the issues they ran into when implementing this was that they had a lot of Critical CSS, 300 kilobytes to be specific. And part of the reason for that was there were a lot of differences in styles between pages but also due to factors like whether a user was logged in, whether a paywall was on, whether a user had a paid or free subscription, and so on. Once they realized this, they decided to create a Critical CSS server that took in all these variables as inputs and returned the correct Critical CSS for a given situation. The application server then inlines this information and it's returned to the user. They're now taking this optimization a step further and trying out a technique known as edge-side inclusion. Edge-side inclusion is a markdown language that allows you to dynamically assemble documents at the CDN level. Why this is exciting is that it allows Nikkei to get the benefits of Critical CSS while also being able to cache the CSS. Granted, they're caching it at the CDN level and not the browser level. In the event that the necessary CSS isn't already cached on the CDN, it simply falls back to serving the default CSS and that requested CSS is cached for future use. Nikkei is still testing out the use of edge-side inclusion, but just through dynamic CSS alone, they were able to decrease the amount of inline CSS in their application by 80% and improve their first contentful paint by a full second. Broly is a newer compression algorithm that can provide better text compression than GZIP. OYO is an Indian hospitality company and they use Broly to compress CSS and JavaScript. This has decreased the transfer size of JavaScript by 15%, which has translated into a 37% improvement in latency. Most companies are only using Broly on static assets at the moment. The reason for this is particularly at high compression ratios, Broly can take longer and sometimes much, much longer than GZIP to compress, but that isn't to say that Broly can't be used on dynamic content and used effectively. Twitter is currently using Broly to compress their API responses. And on P75 payloads, so this would be some of their larger payloads, they found that using Broly decreased the size by 90%. This is really large, but it makes sense when viewed in context of the fact that compression algorithms are gonna be more effective on larger payloads. And our last topic is adaptive serving. So loading pages can be a different experience depending on whether you're on a slow network or a slow device or you're on a high-end device. Now, the network information API is one of those web platform features that give you a number of signals, such as the effective type of the user's connection, save data so you can adapt, but really loading is a spectrum and we can take a look at how some sites handle this challenge. So for low-end users on mobile, Facebook actually, for users on low-end mobile devices, Facebook actually offers a very basic version of their site that loads very fast. It has no JavaScript, it has very limited images, and it uses minimal CSS with tables, mostly for layout. What's great about this experience is that users can view and interact with it in under two seconds over 3G. What about Twitter? So cross-platform Twitter is designed to minimize the amount of data that you use, but you can further reduce data usage by enabling data saver mode. This allows you to control what media you wanna download, and then this mode, images are presented to users when they tap on them. So in iOS and on Android, this leads to a 50% reduction in data usage from images and on web anywhere up to 80%. These savings add up, and users still get an experience that's pretty fast with Twitter on limited data plans. It was part of looking into how Twitter are handling their usage of effective type. We discovered they're doing something really fascinating. They're handling image uploads in an interesting way. So on the server, Twitter compresses images to 85% JPEG and a max edge of 4,096 pixels. But what about when you've got a phone out and you're taking an image, you're taking a picture, but you're on a slow connection and may not be able to upload it? Well, on the client, what they now do is that they check if images appear to be above a certain threshold, and if so, they draw it to the canvas, output it at 85% JPEG, and they see if they're improved size. Often this can decrease the size of phone capture images from four megabytes down to 500 kilobytes. The impact of this was 9.5% reductions in canceled photo uploads. And they're also doing all sorts of other interesting things depending on the effective type of the user's connection. And finally, we've got eBay. So eBay are experimenting with adaptive surveying using effective type.  If you're on a slow connection, it isn't loaded at all. eBay are also looking at limiting the number of search results that are presented to users on really slow connections. And these strategies allow them to focus on small payloads and really give users the best experience based on their situation. So those are just a few things that people are doing with adaptive surveying. It's almost time for us to go. It is. We hope you found our talk helpful. Remember that you can get fast with many of the optimizations that we talked about today. And you can stay fast using performance budgets and light wallet. That's it from us. Thank you. Thank you.


President Joe Biden has unveiled new devastating sanctions on Russia meant to punish the country for its full-skill invasion of Ukraine. Calling out Russian President Vladimir Putin for his aggression, Biden addressed the nation from the White House East Room, his false appearance in public, since the Russian attack commenced late Wednesday. In written statements, Biden deemed Russia's assault a premeditated war and vowed to hold the country accountable. It was never about a genuine security concerns on their part. It was always about naked aggression, about Putin's desire for empire, by any means necessary, by bullying Russia's neighbors through coercion and corruption, by changing borders by force, and ultimately by choosing a war without a cause. Putin's actions betray his sinister vision for the future of our world. Some more nations take what they want by force, but it is a vision that the United States and freedom-loving nations everywhere will oppose with every tool of our considerable power. In the history of this era, Putin's choice to make a totally unjustifiable war on Ukraine will have left Russia weaker and the rest of the world stronger. Liberty, democracy, human dignity, these are the forces far more powerful than fear and oppression.


In my first year of college, my former roommate Carlos, who is now in jail, gave me a pirated episode of SpongeBob as a gift for my birthday. I had told him it was a childhood favorite of mine. Of course, I didn't know it was pirated, until I watched it since the DVD was designed to look genuine. He didn't get away with it, he got caught and arrested for it. While I somewhat miss him, he wasn't a very good person. He was kind of shady, and a bit of a creep. He would watch true crime shows and documentaries all the time, before work, after work, all night, etc. with a huge smile on his face and always seemed to be up to no good. That night, since Carlos was on a date with his girlfriend, I had the night to myself and I decided to watch the DVD. I put the DVD in, turned the TV and DVD player on, got comfortable in my bed and began to watch the DVD. When the episode selection screen came up, I just get play all. The first episode was, Gary takes a bath. The episode was normal, until it got to the scene, where SpongeBob tried to throw Barry in the bath. On the DVD, he successfully threw Barry in the bath leading Gary to let out a loud meow and then fell silent. SpongeBob then started frantically fishing through the bathtub, yelling out nothing but an incoherent rabble. SpongeBob, freaking out, panics and calls the ambulance. When they arrived, one of the paramedics were let into the house, and they go to the bathtub to try and find Gary. I found him. Pollard the paramedic. He then shows SpongeBob a replica of Gary Jerry rigged out of soap scum, algae, and mold. Let's not Gary! SpongeBob shouted. The screen then cuts to a timecard that would normally be seen throughout the show with the text saying, Piracy Detective. The narrator read the text in a very loud and alerting voice. The screen then cuts back to SpongeBob in the bathroom with the paramedic. SpongeBob is on the floor wailing, while cradling the Barry-shaped pile of gunk in his arms. Questions were racing around in my head. This DVD is pirated. How did Carlos get this? Did he know? What's going on? What happened to Barry? The paramedic then looked at me and said, Piracy is a serious crime, and we know what you did. Turn the DVD player off and report the stolen property. This way maybe the court will go easy on you. Then SpongeBob cried out. Gary! Before the screen went black. It then cut to a screen with SpongeBob, alone in the bathroom. It was dark, and he was still wailing on the floor holding the pile of gunk. The text above him read, Nickelodeon does not entertain criminals. This DVD contains pirated episodes of SpongeBob SquarePants. Piracy is against the law. Turn off the DVD player and report the stolen property right now. I turned off the DVD player, took out the DVD, and took a good look at it. I could not find anything wrong with it. It looked like a genuine copy of SpongeBob. I waited until Carlos got home and then I asked him about it. Pirated? He asked. What makes you think it's pirated? I showed him the DVD's contents and he looked pretty frightened. He took the DVD out of my hand and said, Okay, I'm sorry you out that. I'll take care of it tomorrow. He looked pretty nervous. That night, I overheard him on the phone with someone who has a rather raspy voice. But she knows the DVD's pirated. Did you not check the contents of the DVD? The person on the other side of the phone replied in a pretty angry tone, but I couldn't make out what they were saying. At this point I almost knew Carlos had intentionally got me a pirated copy of SpongeBob. I was contemplating whether or not I should call Carlos out, but it was 4.30 in the morning and I was so tired that I fell asleep before I made up my mind. The next day, Carlos told me he was going to go out and that he would fix the problem with the DVD. I had then remembered the phone conversation from last night, so I asked him. I overheard your conversation on the phone last night. Did you intentionally get me a pirated DVD? Carlos then stuttered and looked around for a minute. Uh... No. I didn't know it was pirated. He then asked me if he could borrow some money before I could say anything else, to which I declined. He then left, again, before I was able to say anything. I went on a walk after Carlos left. When I came back, I just hung out around the dorm, chilled out, and waited for Carlos to come back. I then checked the clock, it was 10 p.m. Carlos still hadn't come home. I got a knock on my door, and it was bail. The girl who stayed in the dorm not too far from mine and Carlos's. Reggie, I hate to tell you this, but Carlos recently got arrested and sent to jail. I gasped at what I was told. Arrested. Then Gail responded to me with... Remember that DVD he gave you for your birthday? It was pirated. He got a pirated copy of SpongeBob from one of his friends. He got busted for it and sent to jail. I couldn't help but feel a little shook. Oh, yeah, I found out that it was pirated when I watched it. Gail then gave me a wrapped up gift. I'm sorry about what happened, I wanted to give you this. I smiled and said, oh, thanks. I unwrapped it and found a legitimate box set of SpongeBob DVDs and a black sherpa hoodie. I was always a huge fan of sherpa. Oh, Gail, you shouldn't have. Thank you. Would you like to come in? Then Gail smiled a bit. I'd love to, but I can't, my roommate and I have plans. Sorry. It's okay. I replied, have a nice night. Gail then waved goodbye and left. She was always really sweet. Since I knew Carlos wasn't coming home, I decided to watch the actual copies of SpongeBob Gail gave me and order Burger King for myself. I had a pretty relaxing night to myself, even though Carlos had gotten arrested. I thought about him from time to time, wondering if he was okay. A few weeks have passed since the incident. Carlos is going to be in jail for the next few months, and I have a new roommate now, Tyrone. He's a really good person, and we quickly became best friends over the week, since he's moved in. Needless to say, he's a much better roommate than Carlos. I'm still just a tad bit worried about Carlos, but I'm still doing a lot better. If you're reading this, just buy a DVD. Don't go through the hassle and trouble of piracy.