A virtual teacher who reveals to you the great secrets of Base64

<iframe>

The <iframe> tag is used to embed additional webpages or files into the current webpage. To do this, the developer must specify the URL-address or the data URI in the src attribute.

For example, you can embed an external HTML document as follows:

<iframe src="//static.base64.guru/uploads/html/welcome.html">
  The “iframe” tag is not supported by your browser.
</iframe>

The same can be achieved by encoding HTML to Base64 and embedding it using data URI:

<iframe src="data:text/html;base64,V2VsY29tZSB0byA8Yj5iYXNlNjQuZ3VydTwvYj4h">
  The “iframe” tag is not supported by your browser.
</iframe>

Both behaviors are identical — when you open the page, your browser renders the same HTML contents specified within <iframe> tag. The difference is that in the first case the browser sends one HTTP request to fetch the external file, when in the second case the HTML document is already loaded in the browser’s memory and it does not need to send any HTTP requests.

Please note that Base64 Data URIs have some limitations. In addition, like almost any unconventional solutions, it has both advantages and disadvantages. Therefore, if you plan to use it, first of all, read about Base64 Data URI.

Comments (14)

I hope you enjoy this discussion. In any case, I ask you to join it.

  • Durwsrdbruton,
    Notify me of modifications attachments,.adds and delete or archived settings and sites . I need a full record from 2013 to date!
  • nqhXncMU,
    555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  • nqhXncMU,
    555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
  • gBqsPxAZ,
    -5 OR 77=(SELECT 77 FROM PG_SLEEP(15))--
  • gBqsPxAZ,
    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  • gBqsPxAZ,
    1 waitfor delay '0:0:15' --
  • gBqsPxAZ,
    -1 OR 2+905-905-1=0+0+0+1 --
  • gBqsPxAZ,
    5tAvM5ew'; waitfor delay '0:0:15' --
  • nqhXncMU,
    0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
  • nqhXncMU,
    555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
  • nqhXncMU,
    if(now()=sysdate(),sleep(15),0)
  • nqhXncMU,
    wIlciZ5W') OR 543=(SELECT 543 FROM PG_SLEEP(15))--
  • ncMUFCMU,
    0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
  • ncMUFCMU,
    -1); waitfor delay '0:0:15' --
Add new comment

If you have any questions, remarks, need help, or just like this page, please feel free to let me know by leaving a comment using the form bellow.
I will be happy to read every comment and, if necessary, I will do my best to respond as quickly as possible. Of course, spammers are welcome only as readers.