![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
Using data URL's is bad, right? |
kentl
Member #2,905
November 2002
|
What do you think about embedding pictures/files in data URL's? (Like this one.) This tutorial thinks it's neat as you save HTTP connections which is supposed It's still pretty neat and can be useful from time to time. For example if you want to store |
CGamesPlay
Member #2,559
July 2002
![]() |
I wonder what XSS possibilities we have now. [url data:text/html;base64,PGh0bWw+PGhlYWQ+PHRpdGxlPk9NRyBSRUNVUlNJT048L3RpdGxlPjwvaGV -- Ryan Patterson - <http://cgamesplay.com/> |
BAF
Member #2,981
December 2002
![]() |
Those domain tags that show up after the URL are ugly as hell. It is pretty cool though. And IE will never support anything cool, so who cares? [edit] [edit2] |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Quote: It's almost as useful as storing data with tinyurls. Hmmm, does tinyurl support forwarding to data urls? -- |
BAF
Member #2,981
December 2002
![]() |
I just tried it and it did accept the url however when I went to the URL it didn't work right (at least with CGames's link, I'll try an image). [edit] |
Rampage
Member #3,035
December 2002
![]() |
I don't know much about HTTP, but I remember reading somewhere that GET requests have a length limit, so no big images through the url. -R |
BAF
Member #2,981
December 2002
![]() |
What? This has nothing to do with HTTP or GET requests. |
CGamesPlay
Member #2,559
July 2002
![]() |
Quote: I just tried it and it did accept the url however when I went to the URL it didn't work right (at least with CGames's link, I'll try an image). I the problem is data URLs in the Location header don't work. -- Ryan Patterson - <http://cgamesplay.com/> |
BAF
Member #2,981
December 2002
![]() |
Will they work in meta refresh tags? |
CGamesPlay
Member #2,559
July 2002
![]() |
[url data:text/html;base64,PGh0bWw+PGhlYWQ+PG1ldGEgaHR0cC1lcXVpdj0icmVmcmVzaCIgY2 -- Ryan Patterson - <http://cgamesplay.com/> |
BAF
Member #2,981
December 2002
![]() |
"It worked" |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Quote:
thinks it's neat as you save HTTP connections which is supposed Okay, so we increase the size of the image by encoding it in base-64 and eliminate the possiblity for image caching on dynamic pages. Sounds like a good way to decrease speed! Especially since HTTP/1.1 already supports multiple requests per connection via pipelining! It's as retarded of an idea as it gets. |
HoHo
Member #4,534
April 2004
![]() |
it should save web server some recources since it can load images together with HTML __________ |
kentl
Member #2,905
November 2002
|
At least it's a way to attach some files and stuff in some places where it's not supposed to be possible. I don't think it's practically usable either Matthew. Just one sidenote. The tutorial said that a good way to get the images cached is to include them in CSS. That way it would cache for dynamic pages too, as long as the CSS doesn't change. |
Matthew Leverton
Supreme Loser
January 1999
![]() |
I'd wager the effective performance gain is close to zero or even negative with pipelining enabled. Drawbacks:
Advantages:
Quote: The tutorial said that a good way to get the images cached is to include them in CSS. True, but now you're recreating the same thing you're trying to avoid: extra page reads. Plus, this negates the advantage of not needing file access. |
kentl
Member #2,905
November 2002
|
Quote: True, but now you're recreating the same thing you're trying to avoid That's true. I guess it could still be a valid thing to do in some rare cases. Welcome to my new home page: (Thanks to CGamesPlay!) Linky |
Audric
Member #907
January 2001
|
The only "real" use I can see is to obfuscate spoiler information in a forum, as an alternative to rot13. |
Matthew Leverton
Supreme Loser
January 1999
![]() |
I think a practical example of data images would be if you wanted to distribute an HTML file without having to worry about losing the external resources. Think of something like a game's manual. |
kentl
Member #2,905
November 2002
|
It's a practical example. If it was a Windows game then I would like users of Internet Explorer to be able to enjoy the manual in its full. But if it's a MacOS game or a Linux game it would work well. |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Microsoft has its all-in-one specific format that could be used on Windows platforms. |
CGamesPlay
Member #2,559
July 2002
![]() |
Ugh, this is loooong. But it gave me a great idea that I will hopefully mess with later tonight. [url data:text/html;base64,PGh0bWw+PGhlYWQ+PHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3 -- Ryan Patterson - <http://cgamesplay.com/> |
BAF
Member #2,981
December 2002
![]() |
Not bad, webpages with base64. Now if only it could be stored in TinyURL. |
CGamesPlay
Member #2,559
July 2002
![]() |
I just had the best thought! ML, how big is your access log now that it has a few hits with the Referer set to my data url? -- Ryan Patterson - <http://cgamesplay.com/> |
BAF
Member #2,981
December 2002
![]() |
Okay, so I got bored. [url data:text/html;base64,PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAg [edit] Fixed |
CGamesPlay
Member #2,559
July 2002
![]() |
Doesn't work here. Maybe it's too long? [append] -- Ryan Patterson - <http://cgamesplay.com/> |
|
1
2
|