The big back button quiz - HTTP 203

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 86

  • @ChromeDevs
    @ChromeDevs  3 года назад +32

    Before you start testing that back button yourself, why not subscribe to the channel?

  • @edwincarlsson9014
    @edwincarlsson9014 3 года назад +31

    I love these. Thank you, Surma and Jake!

  • @victornpb
    @victornpb 3 года назад +26

    Most SPAs don’t make use of the back button correctly, and it trains people to not use it because it’s behavior is kinda unexpected. (Does clicking back closes that modal in Twitter or moves me back to previoussite.com?)
    I wish browsers gave the user a visual cue when clocking back actually leaves the current page/origin. The back button still in the 90s.
    They could have like different states, not exactly like but something like this: ⏮⏪◀️

    • @hrgwea
      @hrgwea 3 года назад +4

      And it has become even more confusing now that pages and apps have their own back button somewhere in the upper-left area of the viewport.
      And it's quite common that clicking any of the two buttons does the same thing, which confuses people even more.

    • @31redorange08
      @31redorange08 3 года назад +5

      Opening a modal should not pollute the history.

  • @jakearchibald
    @jakearchibald 3 года назад +25

    My favourite bit is when Surma says "squiz"

    • @dassurma
      @dassurma 3 года назад +16

      shut up...

    • @terrible_-
      @terrible_- 3 года назад +1

      @@dassurma Love you guys!!!

    • @DennisJ42
      @DennisJ42 3 года назад

      Lol poor Surma.. I think you did pretty good on that quiz! Good job ^_^

  • @technikhil314
    @technikhil314 3 года назад +10

    That was hell lot of weirdness. most of the auth services add a to keep session tracking on. Thank god we dont navigate them from parent. BTW I really love these quiz thingy. Makes me think too rather that just watching and following links in description. Cheers to jake and surma. With these videos I feel like I am becoming nerd although I am far far far away from it. 😂

  • @Epistemer
    @Epistemer 3 года назад +3

    14:19 I love how every browser just means chrome + firefox + safari 😂😂

    • @jakearchibald
      @jakearchibald 3 года назад +2

      Those are the ones with different engines. Edge, Samsung, Brave etc all Chromium-based, so I'm pretty sure the behaviour would be the same as Chrome. Happy to be proven wrong though!

  • @Uv9riebdieu2
    @Uv9riebdieu2 3 года назад +10

    Love HTTP203! Keep em coming ♥️

  • @JacobCanote
    @JacobCanote 3 года назад +2

    You have the smartest chrome dev articles.

  • @rzr1191
    @rzr1191 2 года назад

    Loving this series. very underrated

  • @emterroso
    @emterroso 3 года назад +1

    Iframe navigation creating entries in the history was a very useful workaround for implementing SPAs back in the days of IE6/7, which didn't support hashchange event.

  • @ELStalky
    @ELStalky 3 года назад

    The whole navigation part of s makes them really complicated. Been running into issues with that multiple times; like e.g. an ifarme in a modal which tries to re-authenticate and accidentally causes a redirect of the whole page, brilliant.
    I would be fine with deprecating them as long as we get something like a element to provide those capabilities separately.

  • @CoreyWofford
    @CoreyWofford 3 года назад

    I could have swore you guys talked through this couple years ago. It was on a podcast where you talked about the rare case Safari truer to spec than Chrome/Firefox usually a case of the spec being written to follow practice. How back buttons work vs. how they're SUPPOSED to work was just one point in that larger discussion.

  • @kerimgueney
    @kerimgueney 3 года назад +6

    These are great. Thank you two. Also damn, Surma is hella smart.

  • @ahmadhabib1493
    @ahmadhabib1493 3 года назад

    Man you guys are awesome, every night when I am done with my day tired and feeling like just dropping down on the bed, I put you guys on and I am grateful to have always learned with the exciting topics that you guys come up with. It's been a while I have subscribed to this channel and only because of the fun and banter Surma and Jake has. Both of you have a really friendly style and with each video you bring more values to the lives of web developers. Hope you guys be safe and well and keep rocking the tech world

    • @jakearchibald
      @jakearchibald 3 года назад +1

      aww thanks!

    • @ahmadhabib1493
      @ahmadhabib1493 3 года назад

      @@jakearchibald Omg thanks for acknowledging this personally, it means the world to me bro

  • @karlpickett6035
    @karlpickett6035 3 года назад

    Amazing video! I've been using QuickSight (embedded BI tool/dashboards) and it's quite convenient to use it in an -- usually, except when your authentication times out and you hit back the next day -- but was mystified until now how the back button seems to magically work.
    I feel like a boomer, seeing you young guys reverse engineer browser behavior, heck I used to build pages with frames on geocities, so I know this stuff is really old at this point.

  • @Kirarak
    @Kirarak 3 года назад +1

    This is wild and I'm aware of some of those. I have an old chat using s to send and load messages and I've been dealing with these quirks for the last 15 years :D Currently, I add the s using document.write to escape most of the weirdness. Is it your job to propose a reasonable behaviour or to just document the differences? Either way, good luck.

    • @jakearchibald
      @jakearchibald 3 года назад

      A bit of both. Since the browsers all behave differently, I have to pick something to standardise, but this is old old code in a lot of browsers so they don't want to stray too far from what they do now.

  • @garethadams5580
    @garethadams5580 3 года назад

    There's some interesting back button behaviour if a page loads its own URL via XHR, using a different Accept header to return different data:
    Browser => /items (Accept: text/html) # => … visible
    XHR => /items (Accept: application/json) # => { … } returned to Javascript
    /leave-page
    Back => /items # => displays the raw { … } JSON in the viewport
    This is because the browser cache doesn't pay attention to the Accept header (regardless of the Vary header). It just stores the JSON from the XHR in the cache as the "most recently seen" response, and restores that next time that URL is looked up.

    • @garethadams5580
      @garethadams5580 3 года назад

      Now of course I find that Jake wrote a blog post about that exact issue in 2014

    • @jakearchibald
      @jakearchibald 3 года назад

      @@garethadams5580 ohhh interesting! I assume the XHR response doesn't have a vary header?

  • @rishabhanand4270
    @rishabhanand4270 3 года назад

    I thought this would involve backbutton hijacking, you always kinda surprize me jake. Really insightful vid.

  • @kyay10
    @kyay10 3 года назад +1

    I'm curious if you figured out what Firefox does with that s case yet? Because hopefully hopefully it isn't time-based lol

  • @vitabramov89
    @vitabramov89 3 года назад

    I can't decide, what i do more: love these guys or hate s

  • @sharukh7860
    @sharukh7860 3 года назад

    Jake: How are you?
    Surma: I'm .... alive
    How did he not follow up on this 😂

  • @TheNewton
    @TheNewton 3 года назад +1

    The big back button question is when is chrome et all going to make history|navigation manipulation a permission.
    It's nuts how many websites don't seem to get severely punished in ranking when it spams the history so you cannot go back to the serps along with other hijinks.

    • @jakearchibald
      @jakearchibald 3 года назад

      I don't see how this would work in practice, as you'd need to show a permission prompt when the user clicks a link. Chrome tries to mitigate history attacks though, so if you've found an easy way around that, please file it at crbug.com

  • @MrZyclops
    @MrZyclops 3 года назад +2

    More 203 thanks.... a lot more.

  • @alignedfibers
    @alignedfibers 3 года назад

    I am pretty sure this strangeness is very obvious in Service Now. was always really cool but haven't recent changes to browsers helped to lower the need for using them?

  • @ColinRichardson
    @ColinRichardson 3 года назад

    I got to 13:49 and I am tapping out.. You have broken me. I would love to tell you I WILL watch the rest of this .... But if I am honest.... I am dying here!

  • @chris-eg
    @chris-eg 3 года назад +33

    #deprecates

    •  3 года назад

      #UndeprecateFrameset

  • @adamtolbert1296
    @adamtolbert1296 3 года назад

    Also solid content, always look forward to seeing you two go deeeep into weby things, always learn something and good to see how experts talk through the complexities of the web. Makes my imposter syndrome disappear just a little 😅

  • @Benimation
    @Benimation 3 года назад

    Fun fact: you can also press and hold / right-click the forward button, even though you'll probably never use that

  • @ddublu
    @ddublu 3 года назад

    definitely with surma here. I started mentally bracing as soon as I heard "".

  • @ChristopherBurgessTaskbar
    @ChristopherBurgessTaskbar 3 года назад

    Jake Jubilation during the Super Suma Session Sermon 😵

  • @RideTheTeacups
    @RideTheTeacups 3 года назад

    This was fascinating!!! Really wild concepts here. I found it especially hard because I haven’t used s since 1998. (That’s actually completely true - I created a truly hideous multiple-guess trivia game where the potential answers were each loaded in a different .)

  • @phuongdao6046
    @phuongdao6046 3 года назад

    I don't know that if you click the link, it would navigate the

  • @childishalbino9548
    @childishalbino9548 3 года назад

    How do you get into writing specs? Always been a question I’ve been curious about

    • @jakearchibald
      @jakearchibald 3 года назад +5

      Ugh, I replied to this, but moderators deleted my comment. Our moderation is so broken right now, sorry. We have another video on contributing to web standards called "Changing web standards - HTTP 203". I would link to it, but I think that's why they deleted my comment. Can't even link to our own videos. Absolutely ridiculous.

  • @NasserAl-Ruwaili
    @NasserAl-Ruwaili 3 года назад

    I love these, thanks

  • @ChristopherBurgessTaskbar
    @ChristopherBurgessTaskbar 3 года назад

    Great content - challenges us dev's to think.

  • @aovchinn
    @aovchinn 3 года назад +2

    deprecate s !

  • @Invingagan
    @Invingagan 3 года назад

    First 4 minutes and you blew my mind.

  • @ArjenHaayman
    @ArjenHaayman 3 года назад

    This behaviour in s goes back to the times when we used ordinary frames. Say a menu frame that loads pages in the content frame. Then it really makes sense that history works on the content-frame.
    There was even a short time when this was *not* the case which was really annoying, because then you'd click around the site and hitting the back-button would just leave the entire site.
    The day the backbutton started to remember the navigation in the frames was a good day

    • @31redorange08
      @31redorange08 3 года назад

      @@ArjenHaayman Then why don't you fix it?

    • @ArjenHaayman
      @ArjenHaayman 3 года назад

      @@31redorange08 ah, I'm too much used to twitter :-)

  • @ThadHumphries
    @ThadHumphries 3 года назад

    Jake, where did you get that T-shirt?

    • @jakearchibald
      @jakearchibald 3 года назад +1

      Ugh, I replied to this, but moderators deleted my comment. Our moderation is so broken right now, sorry. Anyway, it's "never forget" on TeePublic

  • @JamesCoyle95
    @JamesCoyle95 3 года назад

    I was gonna say it would be so much easier to deprecate s. 😂
    I feel like the web would be a better place if third party content was either an embedded widget object or a portal. If included as an object it effectively just embeds some code into the current page without being a full page. If included as a portal, you get a preview of the page but interaction with it causes the browser to navigate to that page. Either way the parent page can then just treat it like an image or video element rather than a child document.
    I can't think of a single time that I've ever benefitted from being able to use a particular webpage from within another webpage. Every single I've ever used has been a third party widget that didn't need to be an entirely separate document or has been an embedded version of a third party payment provider which would have been a lot more reassuring as a proper redirect to the payment site (not to mention it would then be handled by the app on mobile rather than a tiny window in the browser).

    • @jakearchibald
      @jakearchibald 3 года назад +1

      Fwiw, all my research here branched off trying to figure out how to spec particular parts of portals

    • @chris-eg
      @chris-eg 3 года назад +1

      "...third party content was either an embedded widget object or a portal."
      or placed inside a shadow Dom (closed mode perhaps) to get the sandboxing and its javascript contained within the upcoming "Realms api" github.com/tc39/proposal-realms

    • @jakearchibald
      @jakearchibald 3 года назад

      @@chris-eg fwiw, putting an in shadow DOM doesn't prevent it from adding history entries.

  • @mulllhausen
    @mulllhausen 3 года назад

    how to disable the back button in chrome? add a million s then remove them with javascript - 16:35

  • @attention_shopping
    @attention_shopping 3 года назад

    super interesting!

  • @JacobCanote
    @JacobCanote 3 года назад

    You guys rock!

  • @Manivelarino
    @Manivelarino 3 года назад

    Why would anyone use an when we have components and graphql?

    • @jakearchibald
      @jakearchibald 3 года назад +1

      I guess by "components and graphql" you mean just content in the DOM? In which case the answer is "effective sandboxing of third party content"

    • @Manivelarino
      @Manivelarino 3 года назад

      @@jakearchibald yes, I meant adding third party components as if it's first party and using their api. I think mapbox works this way and I like it.

    • @saithisx
      @saithisx 3 года назад

      @@Manivelarino but then it isn't sandboxed...

    • @Manivelarino
      @Manivelarino 3 года назад

      @@saithisx Do I need it to be sandboxed if the component isn't going to change without me updating it? (via npm for example)

    • @saithisx
      @saithisx 3 года назад

      @@Manivelarino No, but you asked why anyone would use an . For example if your application displays emails (which can be html). With sandbox you can for example forbidd javascript execution, which gives you a layer of protection against malicious emails.

  • @ryan-heath
    @ryan-heath 3 года назад

    Moral of the story: don’t use s 💪

  • @koussayhajkacem287
    @koussayhajkacem287 3 года назад

    Is this actually what Google engineers do all day?

    • @jakearchibald
      @jakearchibald 3 года назад

      We did it for 22:35

    • @koussayhajkacem287
      @koussayhajkacem287 3 года назад

      @@jakearchibald I meant try to break the web actually...

    • @jakearchibald
      @jakearchibald 3 года назад +1

      @@koussayhajkacem287 heh kinda. I'm trying to write how it should work, but then I get to a bit where I think "wait, but how does this work?", then I test browsers and find out it doesn't

  • @lucyledezma709
    @lucyledezma709 3 года назад

    I would like to work in Google!... I am Software Developer and System Analyst..😊

  • @ionelCristianLupu_
    @ionelCristianLupu_ 3 года назад

    who is using s anways?

    • @jakearchibald
      @jakearchibald 3 года назад +7

      Good question! So, I went and queried HTTPArchive about this, which holds data on over 6 million pages, and turns out around 53% of them have s.

    • @ionelCristianLupu_
      @ionelCristianLupu_ 3 года назад

      @@jakearchibald WOW. I didn't expect this. Based on the 99% most accessed websites, how many of them have s? I am curious if most of those 53% websites are just random ones no one uses on daily bases.

    • @SimonBuchanNz
      @SimonBuchanNz 3 года назад

      I suspect most of those are auth or tracking widgets. Probably a good third at least are the Facebook thumbs up widget!

    • @supergnuru
      @supergnuru 3 года назад

      @@jakearchibald Were you querying for s that were in the response body/markup or the HAR files for any s? Any site that has ads is likely using dynamically-generated s.

    • @jakearchibald
      @jakearchibald 3 года назад

      @@supergnuru I'm not sure. I used num_s in the summary_pages table, but I can't find a reference for it. But anyway, ad s are still s.

  • @Zeragamba
    @Zeragamba 3 года назад +1

    I just realized you use a switch controller as a controller for the slides. Nice

    • @Kirarak
      @Kirarak 3 года назад

      Indeed! He upgraded! I remember he always used Wiimote in his Google IO talks :)