I have a very basic data uri:
data:text/html,<body contenteditable style="font: 2rem/1.5 monospace; max-width: 60%; padding: 50px;" onload="document.body.focus();">
I would like to store the text written in the body when it changes and load it when the url is opened again.
I have attempted to use localStorage, sessionStorage and cookies but they are not available to the data uri.
I haven't tried indexedDB because it seemed like far too much code for a PUT on change and a GET on load.
To answer my own question: no.
This is by design so I went about it another way.
Related
I have some email message with pixel
<img src="http://www.google-analytics.com/collect?v=1&tid=UA-50173334-3&t=event&cn=test_campaign&cs=email&ec=hellga&ea=open" width=1 height=1 >
This pixel working in browser and sending event data to google analytics correct.
But if i put code to my email template in Mailchimp and send to any email accounts(gmail,outlook,yandex), pixel didn't sent events data .
I tried another way for:
<style>
* [summary=pixel-gmail]:not(.pixel-gmail){
background-image: url(http://www.google-analytics.com/collect?v=1&tid=UA-50173334-3&t=event&cn=test_campaign&cs=email&ec=hellga&ea=open);}
</style>
<div class="pixel-gmail" summary="pixel-gmail"></div>
But it too did not work
Maybe who know how it really work in email?
If you're using 3rd-party services like SendGrid, AmazonAWS, etc. they may cut your HTML so it wouldn't work properly.
Try to send few test messages to your own mailbox and look on the email-letter content. If there would be still any problems with that - change service or talk to support so they can help you to fix your problem.
The Litmus' tracking code has a div with id #_t, as code bellow.
<style data-ignore-inlining=3D"" type=3D"text/css">
#media print {
#_t { background-image: url('https://ekpz8q6s.emltrk.com/ekpz8q6s?p&d=3Dcarlosfatureto#gmail.com');
}}
div.OutlookMessageHeader {
backgroun=
d-image: url('https://ekpz8q6s.emltrk.com/ekpz8q6sf&d=3Dcarlosfatureto#gmail.com');
}
table.moz-email-headers-table {
background-image: url('https://ekpz8q6s.emltrk.com/ekpz8q6s?f&d=3Dcarlosfatureto#gmail.com');
}
blockquote #_t {
background-image: url('https://ekpz8q6s.emltrk.com/ekpz8q6s?f&d=3Dcarlosfatureto#gmail.com');
}
#MailContainerBody #_t {
background-image: url('https://ekpz8q6s.emltrk.com/ekpz8q6s?f&d=3Dcarlosfatureto#gmail.com');
}
</style>
<div id="_t"> </div>
<img border="0" height="1" src="https://ekpz8q6s.emltrk.com/ekpz8q6s=?d=carlosfatureto#gmail.com" width="1" style="border: 0;height: auto !important;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;">
The "print rate" and "forwards rate" uses this div to identify if the email was printed or forwarded. But, Gmail, Outlook and everyone of the "biggest companies" removes all ids and classes from email's elements.
So, without the id there is no tracking.
The "engagement rate (glanced, deleted, read, skim)" probably use a slow-load image. The time to load is the time that user spent. Once again, Gmail, Outlook and everyone of the "biggest companies" use proxy and cache. In this case, the image is always loaded until the end.
I made some tests and both methods (slow-load image and div with custom id) failed in Gmail and Outlook, but it works in roundcube webmail.
So, my question is. In 2016, someone uses Litmus and it works for you? I know that back in 2010 the Litmus probably worked fine, but now, in 2016, it still works?
Disclaimer - I work for Litmus.
Litmus' Email Analytics definitely does work. This answer is mostly accurate: How does Litmus track their email analytics?
There are two things in your question that are not accurate:
Gmail, Outlook and everyone of the "biggest companies" removes all ids
That is not accurate. You can see from Campaign Monitor's excellent CSS Support Guide for Email that the E#id selector is valid in most major email providers.
The "engagement rate (glanced, deleted, read, skim)" probably use a
slow-load image.
This is not how our analytics works. For ip purposes I'd rather not get into the specifics of how this works here but if you'd like to contact us via support channels we can discuss.
You are correct that Gmail and any other providers that use proxies to cache images will cause issues with the engagement metrics. This is addressed in this support article here: https://litmus.com/help/analytics/understanding-gmail-opens/
I'm attempting to send out an HTML email from Thunderbird (latest versions), and I have an issue where when attempting to add a background-image, the url() is replaced with what looks like the beginning of a hyperlink...
An example would be:
#logo {
height: 427px;
width: 640px;
background: url("myimage.jpg");
}
...
<div id="logo"></div>
and when viewing the actual sent output I get:
background: url(<a class="moz-txt-link-rfc2396E" href="myimage.jpg">"myimage.jpg"</a>);
How can I do what I want? (I can't use an image tag in the email)
Tia!!
S.
EDIT:
It seems that adding a BASE solves my issue, like:
<base href="http://www.myurl.com" />
...
background: url("./myimage.jpg")
That method will not work across all major email clients. There are 2 ways to put backgrounds in html emails that are widely supported (Mostly due to Outlook limitations):
VML (add to an element):
http://backgrounds.cm/
Previous Body-tag Method (only works on whole email body):
How make background image on newsletter in outlook?
I need to display on my Web page a simple text string returned from a REST service. I am currently using an XMLHttpRequest:
<div id="returnedText"></div>
<script type="text/javascript">
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if(xhr.status == 200 && xhr.readyState == 4) {
document.getElementById("returnedText").innerHTML=xhr.responseText;
}
};
xhr.open("GET",url,true);
xhr.send(null);
</script>
Isn't there a lighter way? I considered using a script tag but the Web service in question doesn't support JSONP. I also did a naive attempt with an iframe (putting the REST url as src) but it didn't work.
I did another attempt with iframes and actually this works fine:
<iframe src="url"></iframe>
Where url is the REST service call.
I must have done something wrong the first time (maybe an authentication issue).
Well the iframe route is clunky since you'd be loading the REST response into it and then reaching into it via JS to get the response. What's more, it would cause a visible load in the browser's address bar area. AJAX came along to do away with the iframe hack :)
JSON-P requires about as much setup as AJAX and if your server doesn't support the callback, that's a none starter.
AJAX needn't be thought heavy. Kick it into its own utility function or, even better, use a library, which makes requests like these do'able in one line. jQuery example:
$.get('some/path').done(function(response) { /* do something */ });
through my application I use common Ajax loader Div, i show it always when i make an ajax request
submitHandler: function(form) {
$('#loader').show();
$(form).ajaxSubmit({
type: 'POST',
url: "/exampleactions/example",
data:{
},
success: function(response_data){
$('#loader').hide();
where is the best place to put this div to use it every where ?
shall i put it layout.php ?
IMO
There is not going to be a 100% correct answer for this.
Its totally up to the design of the application.
But, if the same loader is used through out the site, and nothing is loaded outside AJAX, then its probably a good idea to keep the div in the layout and keep it hidden until needed.