data-uri

Data URI used to export to CSV/Excel (no server-side request) : browser support/limitations?

穿精又带淫゛_ 提交于 2019-12-05 17:07:58
问题 Following the questions: Javascript or Flash export to CSV/Excel Is it possible to use any HTML5 fanciness to export local storage to Excel? and as suggested, I'm thinking about generating a CSV file content in the client and then use a Data URI to prompt an "open-in-Excel" action from the browser. After reading the limitations and different levels of support of this feature (Data URI) from browsers I'd like to know about first-hand experience of this technique and about things I've to take

Why would CSS data-URIs be logged as 404 requests?

巧了我就是萌 提交于 2019-12-05 13:26:06
To reduce the number of requests across our site we are using CSS data-URIs rather than linking to external images. For some reason, these data-URIs are occasionally still being logged as a 404 request against our servers. Why would this be happening? Random details: We are using Splunk to track Happens with multiple data-URIs Happens on all browsers On multiple pages throughout our site Our QA has not been able to duplicate the issue Below are the results from a specific data-URI Relevant CSS file - ( http://c.mfcreative.com/lib/tgn/combo.ashx?14/css/v1/main.css ) Unminified version of same

How to resize a Base64 encoded Data URI PNG using javascript?

烂漫一生 提交于 2019-12-05 00:22:37
问题 I have a Base64 encoded PNG squeezed out of a web socket into a web page, that I display using Data URI <img src="data:image/png;base64, --base64 png-- "> Is there a way in javascript or some of its flavours to resize the image I receive into a smaller base64 data URI equivalent, as to dinamically generate a thumbnail version of the given image? Or maybe I could just duplicate the HTML Image object and play with it as a whole, using some obscure jQuery magic trick that I haven't find out yet.

“unknown protocol: data” when using data URIs in IMG tags displayed by JavaFX WebView

亡梦爱人 提交于 2019-12-04 16:40:10
Apologies for the title, I tried to be concise, but it's hard to be in this case. I'm building an application that uses JavaFX's WebView class to display a list of SVG images. Because they need to fit into their parents' width (which can change), I was forced to use <img> tags with data URIs rather than inline <svg> (I won't go into detail on this problem here, but it's a flaw of the WebKit engine used by WebView which prevents <svg> elements from adjusting their height according to their width which works fine in current Firefox versions). Therefore, the innerHTML of the containing element

SVG as data URI not rendering

旧城冷巷雨未停 提交于 2019-12-04 15:38:21
It's probably just a syntax error but I can't find any thorough references on this kind of usage. Chrome is overstriking my background property, so I've obviously offended something. http://jsfiddle.net/YbA39/2/ I want what's in the red box (an svg css background) to render just like the inline svg in the html. Simple, right? Don't say it can't be done! My inspiration is this: http://jsfiddle.net/estelle/SJjJb/ You haven't escaped the '#' characters in the url() syntax. And it's 'viewBox' not 'viewbox'. Here's something that works: http://jsfiddle.net/YbA39/3/ (just a quick urlescaped string).

BASE64 in HTML is not working

拟墨画扇 提交于 2019-12-04 07:14:09
I had tried all possible way to display image using base64 string. But none of them are working. I tested it on IE6,7, Firefox 3. Please tell me what is wrong with below code. <head> <STYLE type="text/css"> div.image { width:100px; height:100px; background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA...); } </STYLE> </head> <body> <img src="data:image/jpg;base64,968" /> <img alt="Embedded Image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." /> <script type="text/javascript" src="data:text/javascript;base64,dmFyIHNjT2JqMSA9IG5ldyBzY3Jv..."></script> <div class=

Are data URIs on <img>s XSS exploitable?

匆匆过客 提交于 2019-12-04 02:42:53
After reading this article I don't have a clear answer: http://palizine.plynt.com/issues/2010Oct/bypass-xss-filters/ Will browsers interpret text/html data URI payload in <img> src as an document where <script> tags are executed? If not then is it safe to allow data URIs in third party HTML? What safety mechanisms exist at the browser level for this use case? The MSDN documentation says IE does not: For security reasons, data URIs are restricted to downloaded resources. Data URIs cannot be used for navigation, for scripting, or to populate frame or iframe elements. On the other hand, Mozilla

How to resize a Base64 encoded Data URI PNG using javascript?

本小妞迷上赌 提交于 2019-12-03 15:23:14
I have a Base64 encoded PNG squeezed out of a web socket into a web page, that I display using Data URI <img src="data:image/png;base64, --base64 png-- "> Is there a way in javascript or some of its flavours to resize the image I receive into a smaller base64 data URI equivalent, as to dinamically generate a thumbnail version of the given image? Or maybe I could just duplicate the HTML Image object and play with it as a whole, using some obscure jQuery magic trick that I haven't find out yet. If this can be done in javascript on client side, I could avoid another HTTP request to my server

Data URI Hash Parameters (Hide PDF toolbar for data URI)

我的未来我决定 提交于 2019-12-03 14:20:10
I have a PDF base64 encode data URI. eg: return <object data="data:application/pdf;base64,JVBERi0xLjMKJf////8KOCAwIG9...VmCjI0MTU4OAolJUVPRgo=" type="application/pdf"></object> I am able to embed it in the page without any problem. However, by default browsers include a toolbar in the PDF. It seems like the only way to disable this toolbar is to include some hash parameters at the end of the url. eg. <object data="path/to/file.pdf#toolbar=0&navpanes=0&scrollbar=0" type="application/pdf"></object> Which works fine if the PDF is accessed through a relative path or URL, but I cant figure out a

How to “download” from data: URIs?

帅比萌擦擦* 提交于 2019-12-02 01:18:38
I have a data: URI that I need to “download” (read: load as a stream or byte array) using the normal .Net WebClient / WebRequest . How can I do that? I need this because I want to display a XAML file generated from SVG, which includes some images using data: URIs. I don't want to always parse the XAML, save the images to disk and then change the XAML to point to the files. I believe WPF uses WebRequest internally to get those images. You can use WebRequest.RegisterPrefix() to do that. You will need to implement IWebRequestCreate that returns a custom WebRequest that returns a custom