data-uri

css cursor using data-uri

江枫思渺然 提交于 2019-11-30 08:26:41
问题 I'm trying to use custom png cursor using data uri but the cursor doesn't change. I've tested on FF 17 which support png as custom cursor. The same data uri work as a background image. Am I using wrong syntax or maybe data-uri can't be used as a cursor image? example: http://jsfiddle.net/u8t3j/ <!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <title>cursor test</title> <style> #cursor { width: 300px; height: 300px; border: 1px solid black; cursor: url(data:image/png;base64

Filename of downloaded file in data:Application/octet-stream;

穿精又带淫゛_ 提交于 2019-11-30 06:10:10
I am trying to download a file using data uri in following manner: <input type="button" onclick="window.location.href='data:Application/octet-stream;content-disposition:attachment;filename=file.txt,${details}'" value="Download"/> The problem is that the downloaded file is always named 'Unknown', whatever I try to use as filename. Is this the correct way to give the file a name ? or something else needs to be done ? Ashraf Bashir Here's the solution, you just have to add a download attribute to anchor tag a with desired name <a href="data:application/csv;charset=utf-8,Col1%2CCol2%2CCol3%0AVal1

Compressing base64 data uri images

一个人想着一个人 提交于 2019-11-29 23:04:25
Problem I'm creating multiple charts that are then sent to the server to create a PDF. This data can get large. Question What is the best way to compress and send the image data to the server Background The charts I'm creating are fairly complex, to save myself the headache all of this is converted to a canvas where the base64 data uri is generated. Currently the data uri(s) are posted to the server to handle the processing. Posted info can get fairly large at around 400-600kb each for a small chart and 12mb for the largest chart. The charts are org charts that can be manipulated/reordered. Is

Animated icon in email subject

流过昼夜 提交于 2019-11-29 18:42:23
I know about Data URI s in which base64 encoded data can be used inline such as images. Today I received an email actually an spam one in which there was an animated (gif) icon in its subject: Here is the icon alone: So the only thing did cross my mind was all about Data URIs and if Gmail allows some sort of emoticons to be inserted in subject. I saw the full detailed version of email and pointed to subject line at the below picture: So GIF comes from =?UTF-8?B?876Urg==?= encoded string which is similar to Data URI scheme however I couldn't get the icon out of it. Here is element HTML source:

Blank image encoded as data-uri [duplicate]

六眼飞鱼酱① 提交于 2019-11-29 18:41:02
This question already has an answer here: Smallest data URI image possible for a transparent image 9 answers I've built an image slider (based on the terrific bxSlider ) which will preload images just-in-time before they slide into view. It's working pretty well already, but I don't think my solution is valid HTML. My technique is as follows: I generate the slider markup with the first slide image being inserted as usual (with an <img src="foo.jpg"> ) and subsequent images being referenced in a data attribute like <img data-orig="bar.jpg"> . A Javascript then juggles the data-orig -> src

Data-URI's and caching

前提是你 提交于 2019-11-29 11:58:30
问题 I read this on Wikipedia: Data URIs are not separately cached from their containing documents (e.g. CSS or HTML files) so data is downloaded every time the containing documents are redownloaded. Does this mean that my code is downloaded every single time a page is refreshed or whenever the user clicks on a navigation link? What can I do to cache the data-uri's? ps - i'm just talking about 20 or so small png files (mostly silk icons but 2 * 16KB files as well) 回答1: Data URIs are nothing more

css cursor using data-uri

亡梦爱人 提交于 2019-11-29 06:21:25
I'm trying to use custom png cursor using data uri but the cursor doesn't change. I've tested on FF 17 which support png as custom cursor. The same data uri work as a background image. Am I using wrong syntax or maybe data-uri can't be used as a cursor image? example: http://jsfiddle.net/u8t3j/ <!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <title>cursor test</title> <style> #cursor { width: 300px; height: 300px; border: 1px solid black; cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAJFklEQVR42rWXCXBU9R3Hv+

Filename of downloaded file in data:Application/octet-stream;

萝らか妹 提交于 2019-11-29 05:50:31
问题 I am trying to download a file using data uri in following manner: <input type="button" onclick="window.location.href='data:Application/octet-stream;content-disposition:attachment;filename=file.txt,${details}'" value="Download"/> The problem is that the downloaded file is always named 'Unknown', whatever I try to use as filename. Is this the correct way to give the file a name ? or something else needs to be done ? 回答1: Here's the solution, you just have to add a download attribute to anchor

How can I convert image binary from API call to data URI in Javascript?

拟墨画扇 提交于 2019-11-29 04:21:58
The Google API I'm using is transmitting images only as binary data. I have absolutly no idea how to put this into a data URI to display it, thanks for any help! The call I'm talking about is this API call . As you can see, it says: The server returns bytes of the photo. For the call (it's an extension), I use the chrome_ex_oauth methods. Maybe I need to add something into the header to get real binary data, not string as it comes in right now... What I need to do is to convert the resulting binary into data URI so I can display it. Ok, I get this out of the XHR request Now, I dont know binary

Can you send images in data:uri format to GMail?

99封情书 提交于 2019-11-28 23:07:47
I'm making a web app in Django that sends user an image to their email. The way that seems most attractive to me for sending the image is in the data:uri format. However, I tested sending this email with a data:uri image in it to my GMail account, and the email shows, but without the image! I know that Chrome and Firefox can both open data:uri images. So it's not a browser problem. But I don't see the data:uri image in GMail at all. Does GMail not support data:uri images? Or possibly I'm sending them wrong? Diodeus - James MacFarlane It's not supported. Mail clients simply remove this from