The big back button quiz - HTTP 203

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 86

  • @ChromeDevs
    @ChromeDevs  3 ปีที่แล้ว +32

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

  • @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.

  • @edwincarlsson9014
    @edwincarlsson9014 3 ปีที่แล้ว +31

    I love these. Thank you, Surma and Jake!

  • @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 ^_^

  • @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!

  • @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. 😂

  • @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.

  • @Uv9riebdieu2
    @Uv9riebdieu2 3 ปีที่แล้ว +10

    Love HTTP203! Keep em coming ♥️

  • @JacobCanote
    @JacobCanote 3 ปีที่แล้ว +2

    You have the smartest chrome dev articles.

  • @kerimgueney
    @kerimgueney 3 ปีที่แล้ว +6

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

  • @rzr1191
    @rzr1191 2 ปีที่แล้ว

    Loving this series. very underrated

  • @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.

  • @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.

  • @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.

  • @rishabhanand4270
    @rishabhanand4270 3 ปีที่แล้ว

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

  • @sharukh7860
    @sharukh7860 3 ปีที่แล้ว

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

  • @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?

  • @chris-eg
    @chris-eg 3 ปีที่แล้ว +33

    #deprecates

    •  3 ปีที่แล้ว

      #UndeprecateFrameset

  • @MrZyclops
    @MrZyclops 3 ปีที่แล้ว +2

    More 203 thanks.... a lot more.

  • @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

  • @vitabramov89
    @vitabramov89 3 ปีที่แล้ว

    I can't decide, what i do more: love these guys or hate 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 :)

  • @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!

  • @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?

  • @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

  • @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 😅

  • @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.

  • @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 .)

  • @NasserAl-Ruwaili
    @NasserAl-Ruwaili 3 ปีที่แล้ว

    I love these, thanks

  • @ddublu
    @ddublu 3 ปีที่แล้ว

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

  • @Benimation
    @Benimation 3 ปีที่แล้ว

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

    • @jakearchibald
      @jakearchibald 3 ปีที่แล้ว

      I've been testing that too 😀

  • @phuongdao6046
    @phuongdao6046 3 ปีที่แล้ว

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

  • @aovchinn
    @aovchinn 3 ปีที่แล้ว +2

    deprecate s !

  • @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.

  • @attention_shopping
    @attention_shopping 3 ปีที่แล้ว

    super interesting!

  • @Invingagan
    @Invingagan 3 ปีที่แล้ว

    First 4 minutes and you blew my mind.

  • @ChristopherBurgessTaskbar
    @ChristopherBurgessTaskbar 3 ปีที่แล้ว

    Great content - challenges us dev's to think.

  • @JacobCanote
    @JacobCanote 3 ปีที่แล้ว

    You guys rock!

  • @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 :-)

  • @mulllhausen
    @mulllhausen 3 ปีที่แล้ว

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

  • @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.

  • @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

  • @lucyledezma709
    @lucyledezma709 3 ปีที่แล้ว

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

  • @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

  • @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.