How YouTube Efficiently Streams Videos through HTTP? - DevTooling YouTube

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ค. 2024
  • This is a new series where I pick a popular website and break down and reverse engineer it through devtools.
    In this video we will look in how TH-cam streams videos efficiently through the HTTP protocol to the client using both Mobile and Desktop versions of the web. There are lots of lessons we can learn from this.
    0:00 Web Mobile TH-cam Watch Page
    4:50 Desktop Web TH-cam Watch Page
    🎙️Listen to the Backend Engineering Podcast
    husseinnasser.com/podcast
    🏭 Backend Engineering Videos
    • Backend Engineering (B...
    💾 Database Engineering Videos
    • Database Engineering
    🏰 Load Balancing and Proxies Videos
    • Proxies
    🏛️ Software Archtiecture Videos
    • Software Architecture
    📩 Messaging Systems
    • Message Queues & PubSu...
    Become a Member
    / @hnasr
    Support me on PayPal
    bit.ly/33ENps4
    Stay Awesome,
    Hussein
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @hnasr
    @hnasr  2 ปีที่แล้ว +4

    Learn the fundamentals of the backend, scaling and load balancing with my Introduction to NGINX udemy course
    Grab a discount coupon here
    nginx.husseinnasser.com

  • @itsthesteve
    @itsthesteve 3 ปีที่แล้ว +82

    That explains why I can listen to a video on the app with the screen off, but when I open it again it has to rebuffer the video. In hindsight makes perfect sense.

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

      Exactly

  • @mutley11
    @mutley11 3 ปีที่แล้ว +199

    Welcome to the world of HTTP video-streaming. Google isn't doing anything innovative here other than using QUIC / HTTP/3. HTTP video-streaming is a flood of new terms if you're familiar with HTTP but not with video-streaming, so I'll very briefly summarise what I've learned in the past few months (having recently deployed a caching service for video-streaming).
    The first lesson I learned is that you need to consider both video-on-domand (VOD) and live-video. Video-on-domand is obviously the most common use-case for TH-cam, but TH-cam Live would be an example of live-video.
    Second lesson I learned: there are many streaming protocols. Thankfully, now that HTML5 can be relied upon many of these can be ignored and the world is moving to HTTP chunk-based streaming protocols for live video. Legacy protocols such as RTMP and others often require browser plugins such as Flash or Silverlight. RTMP remains relevant because that is commonly used to stream the originating content from the encoder (eg. OBS studio) into a video CDN provider such as TH-cam Live. The other legacy protocols you can gratefully ignore. The two HTTP chunk-based streaming protocols typically used today for HTML5 and live-video are MPEG-DASH and Apple HLS; the two are very similar, and MPEG-DASH is a standard that (IIRC) came out of Apple HLS. This is very likely what you will be seeing with your desktop demonstration (but more on that in later)
    Third lesson I learned: particularly for video-on-demand files (that aren't terribly large), is that Progressive streaming is very common. This is based on Range requests that get back partial content (the 206 response code). You see 206 responses frequently with things like PDFs too (eg. Adobe Reader will request different ranges based on which pages you skip to). This is the kind of traffic that you need to be careful about from a web architecture perspective, particularly if your website isn't engineered to serve such content.
    Fourth lesson I learned: don't forget the player. The player is not the browser, but rather a Javascript library that runs in the browser. (That said, browsers do provide their own for progressive video; its typically for live-video where a different player implementation is used). There are a few common players (eg. VideoJS) and some are commercial. Big tip: if you want to study this, make sure you use Incognito mode in Chrome, otherwise you may find that you don't actually see the requests being made in the developer tools (not sure if that's a bug, but it feels like it). It is up to the player (not the browser) what decides what kind of content it wants to get. You'll likely see different types of requests in different browser engines.... which brings us to:
    Fifth lesson: adaptive streaming. In HTTP live-streaming, content is typically transcoded into different resolutions and bitrates, different audio channels (eg. different languages, audio rates), maybe has subtitles etc. The way that the available content sources are described is using an XML-based format called SMIL that describes the various 'representations' that a player can use (and switch to; for example when packet loss is too high to sustain a higher bit rate). I don't believe SMIL is be used in your example, but presumably TH-cam has other smarts built into their player. Oh, and its the player that coordinates the mixing of the video and audio; though I'm no expert on how it does that and manages the synchronisation.
    Sixth lesson: caching is really important, and that's what make HTTP live-streaming scalable. It takes more memory on the server to buffer small segments of video and audio into little chunks of video and little chunks of audio. Compared to streaming RTMP live video much more memory is used. To give you a real-life data-point, I had a Wowza server that would top out at about 110 concurrent MPEG-DASH or HLS streams; with a proxy-cache in front, I could turn that into something much more powerful, at least 2,500 per proxy.
    Stuff I haven't learned yet: authenticating content to authorised persons / subscribers. This bit gets tricky....
    Keep up the great work, I don't know how you manage to publish so often, wow!
    Cheers,
    Cameron

    • @hnasr
      @hnasr  3 ปีที่แล้ว +22

      Very useful tips Cameron!!

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

      I believe TH-cam doesn't need SMIL, it's just puts an argument in the URL for the different versions. The player knows what URL to request.

    • @NastyWicked
      @NastyWicked 3 ปีที่แล้ว +9

      Wow, thank you for taking your time to write this up!

    • @sddkacl2282
      @sddkacl2282 3 ปีที่แล้ว +4

      This is really insightful. Thanks.

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

      This is insightful, I have been searching for a better explanation of how these protocols work. This breaks the ice for me.

  • @aayush_dutt
    @aayush_dutt 3 ปีที่แล้ว +108

    What you actually learnt: Switch to mobile mode and get the video URL from the network tools to download any video from the web

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

      how can we access network tool on android?

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

      ​@@ressimayouz3620 did you watch the video? he literally showed you how to turn on mobile mode using desktop browser

    • @hexerei02021
      @hexerei02021 3 ปีที่แล้ว +1

      @@leduyminh48 He was not talking about desktop browser.

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

      @@leduyminh48 he said from a phone, not from a computer browser pretending to be a mobile browser

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

      Haha, true that! But, I am wondering why Google doesn't just disallow accessing the URL directly? Maybe by just looking for some header that indicates the request has indeed made from the YT site/app?

  • @haakonness
    @haakonness 3 ปีที่แล้ว +59

    206 is just partial content. The browser asked for a byte range, and then the server answers with 206 because it returns only a part of the file. This has been automatically handled by apache and nginx from "the beginning of time". If you host a .mp4 file, the browser will automatically issue partial file requests. So "we should use this more"? It is used all the time. It is up to the browser to request what it wants, if server has accept-ranges header.

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

      I think he was referring to application developers ?

  • @charliesta.abc123
    @charliesta.abc123 3 ปีที่แล้ว +1

    Thank you Hussein, you deserve all the best man. You're doing great things for the dev community

  • @manu4216
    @manu4216 3 ปีที่แล้ว +24

    Front-end tip: you can enable the desktop mode in a simpler way: just disable Dev Tools "device toolbar" (top left corner, 2nd icon).
    You can enable it when you actually need to change the user agent, and simulate a different device.

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

      Love all your content btw 💟

    • @hnasr
      @hnasr  3 ปีที่แล้ว +8

      THANK YOU! I did not know that option exists, and didn't know how to turn off that option, appreciate it dear

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

    The exposure I'm getting from your context is Mars level mind blowing 🤯. I started watching you yesterday and I cant stop. Great work man 💯
    Edited...
    Actually, your voice sounded familiar and the type of content felt like something I've seen somewhere else, I looked at the next video title,"backend engineer portfolio" and I immediately recognised you, the guy from the podcast 💯😹, Hussein

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

    Also, separating the audio enables easier and more seamless video quality switch

  • @leonbenjamin7891
    @leonbenjamin7891 3 ปีที่แล้ว +1

    So glad I found this channel. This is gold

  • @adamgarcia6051
    @adamgarcia6051 3 ปีที่แล้ว +5

    I was just thinking about this exact design! I have started to watch many of your videos. You make learning fun! Keep up the great work

  • @love.ly.
    @love.ly. 3 ปีที่แล้ว +3

    Your content is so easy to watch, you're producing top tier content for the platform! Great job!

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

      Glad you enjoy it Tom! thanks for the support

  • @virenlakum
    @virenlakum 3 ปีที่แล้ว +1

    Today I chose to try youtube music instead of spotify in the gym and YT music has an option of either selecting video or just song and I was wondering how they were doing just audio,
    And you just read my mind, I have my curiosity satisfied, Thanks a lot man, keep up the good work!!!!

  • @Filhodanuvem
    @Filhodanuvem 3 ปีที่แล้ว +1

    Your content is the best in terms of backend. Keep doing this amazing job!

  • @AnoojKrishnan
    @AnoojKrishnan 3 ปีที่แล้ว +9

    Finally a guy who tries out things 😀 love your vids bro 😎

  • @_init_innovate29
    @_init_innovate29 3 ปีที่แล้ว +1

    Really great video. Love to see the entire series. 👍👍

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

    Thank you Hussein! Great idea with devtooling series. 🤘

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

    Great content Hussein. Loved it.

  • @jithin_zac
    @jithin_zac 3 ปีที่แล้ว +5

    Every day I am learning something new. Thanks a lot for this high-quality content.

    • @hnasr
      @hnasr  3 ปีที่แล้ว +1

      My pleasure!

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

    Brilliantly explained - I always wanted to know this but too lazy to do the research on my own. Thanks a lot for sharing.

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

    Fantastic video. Looking forward to more Devtooling videos!

  • @AbdelhameedG
    @AbdelhameedG 3 ปีที่แล้ว +1

    Thanks, Hussein that was informative.

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

    Awesome, I never knew that few days ago I built a project using youtube-dl in my express server and then sending back the video in audio format to client over HTTP 206. I just used res.send() and the express set the status code 206 my file was coming over http the same way like you shown in this video.

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

    Whoa, my new fav "reality tv" channel. I didnt know this existed.

  • @SatwikBonny
    @SatwikBonny 3 ปีที่แล้ว +14

    wow man, you are killing!

  • @rishabh_gour
    @rishabh_gour 2 ปีที่แล้ว +1

    this guy is a true engineer

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

    Wow. This is really cool and i got to know about these hidden stuffs. Thanks for sharing sir.

  • @crustycock593
    @crustycock593 3 ปีที่แล้ว +1

    Using Devtools efficiently is such a nice topic and i am hoping to see a long playlist on this topic. thank you hussein, keep up with these great videos.

    • @hnasr
      @hnasr  3 ปีที่แล้ว +1

      Will keep them coming ! any suggestion on what to devtool next?

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

      @@hnasr performance monitoring and monitoring how much resources is loaded by your app

  • @nandomax3
    @nandomax3 3 ปีที่แล้ว +5

    Best content on back end engineering here on yt. I think I lack a lot of content that goes beyond the basic building of a restful api

  • @KDOERAK
    @KDOERAK 3 ปีที่แล้ว +1

    another great video: keep them coming - thx!

  • @labeebmaqsood
    @labeebmaqsood 3 ปีที่แล้ว +1

    Amazing insightful video!

  • @ca7986
    @ca7986 3 ปีที่แล้ว +1

    MashaaAllah brother Amazing content ❤️

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

    Very exciting idea, Please keep going ...

  • @HarshKapadia
    @HarshKapadia 3 ปีที่แล้ว +1

    Nice video, Hussein!

  • @InshuMussu
    @InshuMussu 2 ปีที่แล้ว +1

    Nice catch.. Hussein

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

    thanks for making such interesting software engineering videos!

  • @rohrvy1989
    @rohrvy1989 3 ปีที่แล้ว +1

    This is really good.. for videos with a longer time, just remove the range parameter at the end and it'll work

  • @MrLoggfreak
    @MrLoggfreak 3 ปีที่แล้ว +8

    TH-cam starts splitting audio and video from 1080p onwards, the mobile website (unlike the app) always downloads a lower quality by default, that's why the desktop mode looks different

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

    Wow!! Very informative.

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

    Great video! It's very rare to find such kind of education online, I am very interested to explore more on TH-cam such as how it registers views, how watch time gets updated, even real-time view tracking. Please if possible kindly make a video on this.

  • @AmitKumar-qv2or
    @AmitKumar-qv2or 3 ปีที่แล้ว +66

    4:04 i laughed so hard.... rip ssyoutube

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

    Hussein You are Indian gem

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

    Please keep making these vids.

  • @alenygam6048
    @alenygam6048 2 ปีที่แล้ว +1

    THIS IS GENIOUS.

  • @4nkitpatel
    @4nkitpatel 3 ปีที่แล้ว

    Please make this type of video , more and more and more and more and more and more... :), It's awesome 🙏

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

    Very informative!

  • @aneeshanil4459
    @aneeshanil4459 3 ปีที่แล้ว +1

    You are Legen-wait-for-it-dary.. Legendary

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

    Awesome bro great video!

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

    This is really great content.

  • @rangawanigathunga380
    @rangawanigathunga380 3 ปีที่แล้ว +1

    Mad genius!

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

    I like that series

  • @rohitsalaria9540
    @rohitsalaria9540 3 ปีที่แล้ว +1

    Great video

  • @kushalkamra3803
    @kushalkamra3803 ปีที่แล้ว

    Thank you 🙏

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

    i love your videos keep the good work

  • @cruzbradley5566
    @cruzbradley5566 3 ปีที่แล้ว +1

    That's really cool. Thanks man🤟

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

      😍

  • @helios6193
    @helios6193 3 ปีที่แล้ว +1

    Waiting for the next video in series...

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

    Great video !

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

    I think the video audio streams being separated probably has to do with youtube music as well. great video thanks for this video

  • @pk-bn1hc
    @pk-bn1hc 3 ปีที่แล้ว +1

    I would also suggest to make video on adaptive bitrate streaming using mpeg dash or hls files, that would be pretty interesting . Thanks

  • @driziiD
    @driziiD 3 ปีที่แล้ว +1

    peak content!

  • @abdelrahman5094
    @abdelrahman5094 3 ปีที่แล้ว +1

    Interesting !

  • @kirillzlobin7135
    @kirillzlobin7135 6 หลายเดือนก่อน

    Cool!!! This separation by audio and video can be on desktop in browser two, if someone folded the browser

  • @mangeshgupta5677
    @mangeshgupta5677 3 ปีที่แล้ว +1

    please, More videos like this ! Thank you

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

      🙏👍

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

    A few weeks ago I was in the Caribbean and quite often the internet would seem to be down. I wasn't able to access any website... except for TH-cam! After looking at the net traffic I realized that out of every request youtube.com was the only one using QUIC. It was very interesting to me I wasn't able to access other sites during these "outages".

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

    Very informative now I know how to download a youtube video without using the other online tools. ; )

  • @marinmiletic5780
    @marinmiletic5780 3 ปีที่แล้ว +1

    this is dope, do these series more. do netflix next

  • @hawk_wheels
    @hawk_wheels 3 ปีที่แล้ว +1

    Nice 👍

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

    Awesome format

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

      Glad you think so!

  • @bonaventureokoli7988
    @bonaventureokoli7988 3 ปีที่แล้ว +1

    so good

  • @shub_zzz
    @shub_zzz 3 ปีที่แล้ว +1

    Reddit also does something similar. It also gets the video and audio from separate requests.

  • @__________________________6910
    @__________________________6910 3 ปีที่แล้ว +1

    I'm subscribing your channel.

  • @TheSaceone
    @TheSaceone 3 ปีที่แล้ว +1

    I have downloaded this video just to try

  • @mohdjohan7459
    @mohdjohan7459 3 ปีที่แล้ว +1

    Nice

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

    Man this video is getting some views Hussein. Looks like your time with the TH-cam algorithm has come!

  • @hemsagarpatel8992
    @hemsagarpatel8992 3 ปีที่แล้ว +1

    Awsome

  • @mehulbisht9708
    @mehulbisht9708 3 ปีที่แล้ว +33

    3:55 thanks now i don't need to use third party apps for downloading any youtube video 😂😂

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

      The video is sliced into several requests, I'm guessing the 3rd party app stitches it back up (?)

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

      @@fahmir7429 i guess switch to mobile mode, to get the unlsliced version

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

      @@marcuschiu8615 didnt he state that mobile version splices the files into audio and video requests? I'm guessing that requires stitching too? Havent tried though

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

      @@fahmir7429 i pretty sure the mobile version is not spliced. it uses some HTTP 206 thing

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

      @@fahmir7429 oh nvm, I thought you meant the video itself is spliced

  • @PianoSmooth
    @PianoSmooth 3 ปีที่แล้ว +1

    Good stuff! Can you do this detailed breakdown with Browser based Google Stadia? Would be really interesting to see how they get such low latency.

    • @infiniti2011
      @infiniti2011 2 ปีที่แล้ว +1

      Websockets, and very powerful servers. Websockets allow for near instantaneous connections, it's what they use for messaging apps, and any realtime things. Lots of games use websockets as well, as it's too expensive to send a REST API call everytime you want to move.

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

    I can understand why youtube algo didn't recommand this video to alot of people 🤣

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

    Please discuss about youtube adaptive video streaming. How they alow us to switch video quality on the fly?

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

    Oh, so that's why when my video buffers on desktop the audio plays a little longer!

  • @kvelez
    @kvelez ปีที่แล้ว

    Interesting.

  • @RobertCastilloC
    @RobertCastilloC 2 ปีที่แล้ว +1

    Does Hussein has a video of how to do what we saw in this Video?

  • @shireeshkasam6727
    @shireeshkasam6727 2 ปีที่แล้ว +1

    How does the video data stored in the server then?
    Is it webm and mp3 or mp4?

  • @jigarwala8424
    @jigarwala8424 3 ปีที่แล้ว +1

    What about new pipe? Or vanced youtube app. We can minimize the app. And they claim to not download video in background

  • @parth46767
    @parth46767 ปีที่แล้ว

    Great Video! I am still a little confused as to where all the different streaming protocols like HLS, RTSP, DASH, etc. fit into this. I have seen an couple of nodeJS example of using Partial Content Header to stream video but not sure if that is the best way to do video streaming. As I am trying to build a streaming service using Rust, could someone point me in the right direction. Thanks.

  • @iamunknownperiod3355
    @iamunknownperiod3355 3 ปีที่แล้ว +1

    I think TH-cam have separated Audio and Video streams a long time ago, not just when they started using QUIC. I think it started when they started using DASH but I'm not sure.

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

    I love how the CDN-video even has a download button. Also reminds me of youtube-dl being taken down not too long ago. Seems like all of this is just "security through obscurity" or something like that. I mean, TH-cam only makes money when people watch ads I guess.

  • @patricknebe6030
    @patricknebe6030 3 ปีที่แล้ว +1

    Interesting. So on mobile, the server returns a 206 status code and sends the video as a continuous stream ?
    While on desktop, the server returns a 200 status and then sends only the requested chunks of audio and video?
    Then as the user watches the video the app can request for more chunks in the background. Once the chunks arrive, they are appended to the previously downloaded chunks in order to make the viewing experience smooth. Is this correct? Or am I missing something?

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

    It’s basically what we do paginating our endpoints. This one is paginating chunks of videos in bytes

  • @DavesOSTs
    @DavesOSTs ปีที่แล้ว

    Opening directly the video playback url sadly doesn't work anymore. I tried it with chrome. Insted a "videoplayback" file will be downloaded. I'm trying to convert it to mp4

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

    I wonder if Weibo works in a similar way, when you acess Weibo the default video is 1080p , and it runs very smoothly.

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

    But how to determine real tab focus to play only audio track if user just separates windows on the screen?

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

    Uploaded video is encoded to different format by streaming processing platform and then place at CDN. TH-cam will return partital file with 206 to app, web format with 200 to web browser.

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

    I have managed to stream videos from s3 by converting them into hls format ie. m3u8 format using ffmpeg library and I can play them in frontend using videojs.

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

    It does not work properly when open "videoplayback" in new tab. It saves only fragment. What I am doing wrong?

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

    You can disable the mobile viewer by clicking the 2nd icon on the top left of the dev tools

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

    Cool video! But....how can they separate the audio and the video and show you together later??

  • @gmailservice9945
    @gmailservice9945 3 ปีที่แล้ว +1

    How can we find the link to 1080p from youtuebe?

  • @echoky3189
    @echoky3189 2 ปีที่แล้ว +1

    4:05 How can you download a video in a different resolution?

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

    I find it out youtube doesn't send the video playback in this manner when the device isnt a mobile device. When I follow the video playback url in desktop mode the resource is empty.