I tried running the test script on script.google.com ( https://developers.google.com/gmail/schemas/apps-script-tutorial ), and while the email sent, the action button wasn't enabled.
I'm wondering if this is because I am logged in as a google apps user (me#mydomain.com). I see SPF pass and DKIM in the mail headers, and I do see other action buttons in my google apps gmail.
Delivered-To: me#mydomain.com
Received: by 10.49.47.9 with SMTP id z9csp53721qem;
Wed, 12 Jun 2013 09:56:05 -0700 (PDT)
X-Received: by 10.182.126.226 with SMTP id nb2mr15714364obb.34.1371056165241;
Wed, 12 Jun 2013 09:56:05 -0700 (PDT)
Return-Path: <3JKi4UQUJBekOLcjYOLcjY.YPeOLcjYOLcjY.YPe#maestro.bounces.google.com>
Received: from mail-oa0-x246.google.com (mail-oa0-x246.google.com [2607:f8b0:4003:c02::246])
by mx.google.com with ESMTPS id r7si17176840obg.111.2013.06.12.09.56.04
for <me#mydomain.com>
(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
Wed, 12 Jun 2013 09:56:05 -0700 (PDT)
Received-SPF: pass (google.com: domain of 3JKi4UQUJBekOLcjYOLcjY.YPeOLcjYOLcjY.YPe#maestro.bounces.google.com designates 2607:f8b0:4003:c02::246 as permitted sender) client-ip=2607:f8b0:4003:c02::246;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of 3JKi4UQUJBekOLcjYOLcjY.YPeOLcjYOLcjY.YPe#maestro.bounces.google.com designates 2607:f8b0:4003:c02::246 as permitted sender) smtp.mail=3JKi4UQUJBekOLcjYOLcjY.YPeOLcjYOLcjY.YPe#maestro.bounces.google.com
Received: by mail-oa0-f70.google.com with SMTP id i4so1520067oah.9
for <me#mydomain.com>; Wed, 12 Jun 2013 09:56:04 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20120113;
h=mime-version:message-id:date:subject:from:to:content-type
:x-gm-message-state;
bh=nniz4GW4RjisC3jKnq4Um4I4sY/FfW0e4vae0CbzrBM=;
b=ZdAFsXiPt/07HwxkeNc1VDF+5XzOKT73W9gweiNQOiyeixAVYoLpmlrRWY6XXo3X1j
O/kHu7wMMNJI84Pcv4GLB8LmIedGKTgKYvo+WIx9FAfZxYf2zW41mwPh7GysdZQ7RivF
1euibwDPLypdd89MSTCSA3MBk62VnpExUMra0Og0yPjGszqIYW/Jt0YAREGP7ldOr/7j
K0b/Fi3XB11sG+3ywu3ctNs+7RzZ7IyV3pXGEV6OvMjkZzOX+NnnXVqw8ZoAHm1wJHIc
iqQrhiZ0AeT8HGip+lfbPrSuH5PLF1CtGlFce9GUCqIWWy/TiiVQ5Hat7I9cN/uuo7aO
RDqg==
MIME-Version: 1.0
X-Received: by 10.182.56.200 with SMTP id c8mr4437548obq.33.1371056164810;
Wed, 12 Jun 2013 09:56:04 -0700 (PDT)
Message-ID: <001a11c2c236ac8fb004def7e33f#google.com>
Date: Wed, 12 Jun 2013 16:56:04 +0000
Subject: Test Actions in the Inbox - Wed Jun 12 2013 09:56:04 GMT-0700 (PDT)
From: me#mydomain.com
To: me#mydomain.com
Content-Type: multipart/alternative; boundary=001a11c2c236ac8fa304def7e33c
X-Gm-Message-State: ALoCoQk0dwVXVKag+tFK/DdT/gjAPLfjoz8w8Rfbzz8Q2GT0xh0oIly9+Yi2acnPA69hEefyluux
--001a11c2c236ac8fa304def7e33c
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
This a test for a Go-To action in Gmail.
--001a11c2c236ac8fa304def7e33c
Content-Type: text/html; charset=ISO-8859-1
<html>
<head>
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EmailMessage",
"description": "Check this out",
"action": {
"#type": "ViewAction",
"url": "https://www.youtube.com/watch?v=eH8KwfdkSqU"
}
}
</script>
</head>
<body>
<p>
This a test for a Go-To action in Gmail.
</p>
</body>
</html>
--001a11c2c236ac8fa304def7e33c--
Google Apps domain get updates on a different schedule than Gmail users and actually the domain administrators can choose to be on the Scheduled Release Track or the Rapid Release Track for updates:
http://whatsnew.googleapps.com/release-tracks
I guess your domain is on the Scheduled Release Track and the support for Actions hasn't rolled out yet.
Related
Why are the lines not connecting the dots on my chart?
I know the last array item has no data but I don't think that's the problem.
[1] pry(#<#<Class:0x007fb1936e6828>>)> result
[
[0] {
:name => "Positive Room Pressure",
:data => {
Thu, 12 Jun 2014 16:25:28 UTC +00:00 => true,
Mon, 16 Jun 2014 19:27:21 UTC +00:00 => true,
Tue, 01 Jul 2014 08:58:40 UTC +00:00 => true,
Mon, 07 Jul 2014 19:21:42 UTC +00:00 => true,
Wed, 23 Jul 2014 20:43:23 UTC +00:00 => true,
Wed, 23 Jul 2014 21:05:04 UTC +00:00 => true,
Fri, 25 Jul 2014 05:24:18 UTC +00:00 => false,
Mon, 25 Aug 2014 13:29:40 UTC +00:00 => true
},
:discrete => true
},
[1] {
:name => "Room Humidity",
:data => {
Fri, 16 May 2014 12:13:07 UTC +00:00 => 65.0,
Tue, 10 Jun 2014 19:27:53 UTC +00:00 => 64.0,
Wed, 11 Jun 2014 15:45:17 UTC +00:00 => 65.0,
Thu, 12 Jun 2014 16:25:27 UTC +00:00 => 25.0,
Mon, 16 Jun 2014 19:27:22 UTC +00:00 => 66.0,
Mon, 16 Jun 2014 20:35:34 UTC +00:00 => 97.0,
Tue, 01 Jul 2014 08:58:46 UTC +00:00 => 70.0,
Mon, 07 Jul 2014 19:22:25 UTC +00:00 => 52.0,
Wed, 23 Jul 2014 21:05:18 UTC +00:00 => 65.0,
Mon, 25 Aug 2014 13:29:32 UTC +00:00 => 0.3
},
:discrete => true
},
[2] {
:name => "Ambient Temperature",
:data => {
Fri, 16 May 2014 12:13:10 UTC +00:00 => 33.0,
Tue, 10 Jun 2014 19:28:05 UTC +00:00 => 32.5,
Wed, 11 Jun 2014 15:45:25 UTC +00:00 => 33.0,
Thu, 12 Jun 2014 16:25:40 UTC +00:00 => 34.0,
Mon, 16 Jun 2014 19:27:23 UTC +00:00 => 26.0,
Tue, 01 Jul 2014 08:58:51 UTC +00:00 => 25.0,
Mon, 07 Jul 2014 19:22:33 UTC +00:00 => 34.0,
Wed, 23 Jul 2014 21:05:29 UTC +00:00 => 23.0,
Tue, 12 Aug 2014 22:39:31 UTC +00:00 => 41.0,
Mon, 25 Aug 2014 13:29:31 UTC +00:00 => 23.0
},
:discrete => true
},
[3] {
:name => "smell",
:data => {},
:discrete => true
}
]
![my test chart][1]
[1]: http://i.stack.imgur.com/u4JkJ.jpgstrong text
ERB to generate chart looks like:
I also encountered this issue and fixed it by making sure my date fields were all the same value. Since I was doing my aggregation by day, the time value on the field was meaningless. I quickly fixed the issue by converting the DateTime object to a Date object.
User.first.created_at.to_date
I hope this helps!
As previous answers have mentioned, this seems to be due to the data points not sharing x-axis values. However, Highcharts handles such irregular data just fine, and it's supported by chartkick. Just source Highcharts (and jQuery as a dependency) instead of Google charts, e.g.
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="path/to/chartkick.js"></script>
For a demo, check out: http://www.highcharts.com/demo/spline-irregular-time
I just encountered the same issue and I figured it out. Chartkick cannot draw lines if one of the data element is an empty hash.
In your case, the third array object has an empty data hash. Replace it with the below snippet and you should see lines
[3] {
:name => "smell",
:data => {
Fri, 16 May 2014 12:13:10 UTC +00:00 => 33.0,
Tue, 10 Jun 2014 19:28:05 UTC +00:00 => 32.5
}
:discrete => true
}
I ran into the same thing, and found that this happens when your data points don't share X-axis values. So in your example, the hash keys would need to be the same for each hash in the array.
Edit (2): I got this to work using Google Charts scatter chart (https://developers.google.com/chart/interactive/docs/gallery/scatterchart) directly. I had to do some permutations on the data to make it work... The data needs to look like the following to get the multi-line chart effect:
[['count', 'users', 'page views', 'bounces'],
[ new Date('09 Oct 2014'), 0, null, null ],
[ new Date('10 Oct 2014'), 1, null, null ],
[ new Date('11 Oct 2014'), 3, null, null ],
[ new Date('12 Oct 2014'), 3, null, null ],
[ new Date('09 Oct 2014'), null, 2, null ],
[ new Date('11 Oct 2014'), null, 15, null ],
[ new Date('12 Oct 2014'), null, 17, null ],
[ new Date('10 Oct 2014'), null, null, 1 ],
[ new Date('11 Oct 2014'), null, null, 10 ],
[ new Date('12 Oct 2014'), null, null, 10 ]]
There's also this: https://github.com/JohnathanWeisner/chartkick/tree/FEATURE/Trendline. It's a fork that adds scatter_chart, but I didn't feel like doing the necessary data permutations in ruby :P
In rails how to get the exect day after adding offset
irb(main):066:0> DateTime.now.utc
=> Sat, 29 Mar 2014 19:12:57 +0000
after adding 5.30 hours it should show 30 march. why it is 29 again .anything I missed here
irb(main):065:0> DateTime.now.utc.change(:offset => "+0530")
=> Sat, 29 Mar 2014 19:09:03 +0530
I have an Rails 4 application that collects attendance at church services. Some weeks there are two services and some weeks there is only one. I need to get the total attendance for each week and show it as a graph.
By calling:
Stat.calculate(:sum, :attendance, group: :date)
in the console I have been able to collect the data in a hash like this:
{Sun, 06 Jan 2013=>66, Sun, 13 Jan 2013=>65, Sun, 20 Jan 2013=>60, Sun, 27 Jan 2013=>67, Sun, 03 Feb 2013=>60, Sun, 10 Feb 2013=>76, Sun, 17 Feb 2013=>65, Sun, 24 Feb 2013=>52, Sun, 03 Mar 2013=>52, Sun, 10 Mar 2013=>45, Sun, 17 Mar 2013=>56, Sun, 24 Mar 2013=>134, Sun, 31 Mar 2013=>76, Sun, 07 Apr 2013=>88, Sun, 14 Apr 2013=>87, Sun, 28 Apr 2013=>93, Sun, 05 May 2013=>93, Sun, 12 May 2013=>95, Sun, 19 May 2013=>90, Sun, 26 May 2013=>87, Sun, 02 Jun 2013=>71, Sun, 09 Jun 2013=>86, Sun, 16 Jun 2013=>109, Sun, 23 Jun 2013=>80, Sun, 30 Jun 2013=>68, Sun, 07 Jul 2013=>75, Sun, 14 Jul 2013=>73}
But What I need for my chart is an array of hashes in the form of:
{date: "Sun, 23 Jun 2013", attendance: 80}, {date: "Sun, 30 Jun 2013", attendance: 68"}
So I am trying to figure out how to convert the first form into the second form.
I'm sure its something pretty easy, but my limited rails knowledge is hitting a wall.
.collect{|key,value| {:date => key, :attendance => value} }
loop through and create a new hash where the original key becomes the value for date and the original value becomes the value for attendance. These new hashes are collected into an array.
You can think as below:
h = {"Sun, 06 Jan 2013"=>66, "Sun, 13 Jan 2013"=>65, "Sun, 20 Jan 2013"=>60 }
h.map{|k,v| Hash[:date,k,:attend,v]}
# => [{:date=>"Sun, 06 Jan 2013", :attend=>66},
# {:date=>"Sun, 13 Jan 2013", :attend=>65},
# {:date=>"Sun, 20 Jan 2013", :attend=>60}]
I'm sending an email using Rails like this:
attachments["ticket.pdf"] = WickedPdf.new.pdf_from_string(render_to_body(pdf: "ticket", template: 'template' }))
This works well in Gmail but in several other clients the attached pdf just doesn't appear.
Looking at the source code I realized it's a problem with mimeparts.
I'm having a hard time making an attachment file show in yahoo and several other email clients such as Thunderbird, if I analize the source code of the email sent I discover this:
The mimepart is the same for each part of the file...
the hierarchy (as far as i understand) must be like this:
multipart/mixed
multipart/alternative
multipart/related
text/html
image/png (e.g. for an inline attachment; pdf would be another good example)
text/plain
application/zip (e.g for an attachment--not inline)
This i extracted from https://github.com/jcoleman/mail_alternatives_with_attachments
Here, is the email source (just chunks of the content for better understanding):
Delivered-To: someone#yahoo.com
Received: by 10.194.54.135 with SMTP id j7csp144091wjp;
Fri, 28 Sep 2012 10:55:03 -0700 (PDT)
Received: by 10.224.187.146 with SMTP id cw18mr18768052qab.35.1348854902751;
Fri, 28 Sep 2012 10:55:02 -0700 (PDT)
Return-Path: <somewhare#company.com>
Received: from mail-qa0-f46.company.com (mail-qa0-f46.company.com [209.85.216.46])
by mx.company.com with ESMTPS id c6si13006455qao.34.2012.09.28.10.55.02
(version=TLSv1/SSLv3 cipher=OTHER);
Fri, 28 Sep 2012 10:55:02 -0700 (PDT)
Received-SPF: pass (company.com: domain of somewhere#company.com designates 209.85.216.46 as permitted sender) client-ip=xx.xxx.xxx.xxx;
Authentication-Results: mx.company.com; spf=pass (company.com: domain of somwhere#company.com designates 209.85.216.46 as permitted sender) smtp.mail=somewhere#company.com; dkim=pass header.i=#company.com
Received: by mail-qa0-f46.company.com with SMTP id c26so105866qad.5
for <someone#company.com>; Fri, 28 Sep 2012 10:55:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=company.com; s=20120113;
h=date:from:reply-to:to:message-id:subject:mime-version:content-type
:content-transfer-encoding;
bh=nETVpMomUq0PkrNf9ScGjdaBPc5tYF0m1Rphx5FNS4c=;
b=I1ICSRRK10cdrqXxkNWmK5cLvXOqFpxXmzxNMlIVa8jh+4U1GwqwI1GZF7BRXh5FAU
wCyTzXfSkBrmn2cVGwUUiNEh956KT2ssWx37cQIb915lSp6rdIqflgQcF9yKwmtJoxDL
qO+nEVse7+Azi828zC7D6VV7ebAbmnr006KmppkH9bxILk+syiPKLvp4rZXAMIp0IFW8
nYZ2jY+n/ryduTSl0qDaBDCzVrky2eNwpqfJYizoYWIhxFuDmUWwaPpKzfWoxzT4b0+P
Mp/Ugv6iN1QyETJWbOfX4lpGezFzcaV7reZaBXLzcqUe1dc8elxFfWncsE0vozmFaj8m
z37Q==
Received: by 10.224.58.134 with SMTP id g6mr18690371qah.40.1348854902269;
Fri, 28 Sep 2012 10:55:02 -0700 (PDT)
Return-Path: <somwhere#company.com>
Received: from localhost.localdomain (company.com. [xx.xxx.xxx.xx])
by mx.company.com with ESMTPS id ck11sm13357478qab.17.2012.09.28.10.54.56
(version=TLSv1/SSLv3 cipher=OTHER);
Fri, 28 Sep 2012 10:55:00 -0700 (PDT)
Return-Path: <bounces1#somewhere.com>
Date: Fri, 28 Sep 2012 15:09:56 -0300
From: somewhere <somewhere#company.com>
Reply-To: someone#company.com
To: someone#company.com
Message-ID: <5065e7f4b41bf_a9e43fdbdd45a7601574c#megara.local.mail>
Subject: algun subject
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5065e7f4af345_a9e43fdbdd45a760153b9";
charset=UTF-8
Content-Transfer-Encoding: 7bit
----==_mimepart_5065e7f4af345_a9e43fdbdd45a760153b9
Date: Fri, 28 Sep 2012 15:09:56 -0300
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-ID: <5065e7f4b0ead_a9e43fdbdd45a7601546#megara.local.mail>
********
texto cualquiera
********
----==_mimepart_5065e7f4af345_a9e43fdbdd45a760153b9
Date: Fri, 28 Sep 2012 15:09:56 -0300
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-ID: <5065e7f4b1d7d_a9e43fdbdd45a76015576#megara.local.mail>
<html xmlns=3D'http://www.w3.org/1999/xhtml'>
<html xml:lang=3D'en' xmlns=3D'http://www.w3.org/1999/xhtml'>
<head>
<meta content=3D'text/html; charset=3Dutf-8' http-equiv=3D'Content-=
Type'>
<title>somewhere</title>
<link href=3D'/assets/ev_classic_mailer.css' rel=3D'stylesheet' typ=
e=3D'text/css'>
<link href=3D'/assets/mailer_colors.css' rel=3D'stylesheet' type=3D=
'text/css'>
</head>
<body>
<table class=3D'mail-container-table'>
<tr>
<td class=3D'decoration' colspan=3D'3'></td>
</tr>
<tr>
<th background=3D'https://here.company.com/ass=
ets/mail/ev_classic_hd.png' class=3D'bcolor12 border header-01' colspan=3D=
'3'>
<h1>cogotudo</h1>
</th>
</tr>
</table>
</body>
</html>
</html>
----==_mimepart_5065e7f4af345_a9e43fdbdd45a760153b9
Date: Fri, 28 Sep 2012 15:09:56 -0300
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-ID: <5065e7f4b2ede_a9e43fdbdd45a76015666#megara.local.mail>
<html xmlns=3D"http://www.w3.org/1999/xhtml" style=3D"outline: 0; font-we=
ight: inherit; font-style: inherit; font-size: 100%; font-family: inherit=
; vertical-align: baseline; margin: 0; padding: 0; border: 0;">
<html xml:lang=3D"en" xmlns=3D"http://www.w3.org/1999/xhtml" style=3D"o=
utline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; fo=
nt-family: inherit; vertical-align: baseline; margin: 0; padding: 0; bord=
er: 0;">
<head>
<meta content=3D'text/html; charset=3Dutf-8' http-equiv=3D'Content-=
Type'>
<title>somewhere</title>
<link href=3D'/assets/ev_classic_mailer.css' rel=3D'stylesheet' typ=
e=3D'text/css'>
<link href=3D'/assets/mailer_colors.css' rel=3D'stylesheet' type=3D=
'text/css'>
</head>
<body style=3D"outline: 0; font-weight: inherit; font-style: inherit;=
</body>
</html>
</html>
----==_mimepart_5065e7f4af345_a9e43fdbdd45a760153b9
Date: Fri, 28 Sep 2012 15:09:56 -0300
Mime-Version: 1.0
Content-Type: application/pdf;
charset=UTF-8;
filename=ticket.pdf
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=ticket.pdf
Content-ID: <5065e7f43b81b_a9e43fdbdd45a760150c9#megara.local.mail>
JVBERi0xLjQKMSAwIG9iago8PAovVGl0bGUgKP7/KQovQ3JlYXRvciAo/v8p
Ci9Qcm9kdWNlciAo/v8AUQB0ACAANAAuADgALgAyACAAXCgAQwBcKQAgADIA
MAAxADEAIABOAG8AawBpAGEAIABDAG8AcgBwAG8AcgBhAHQAaQBvAG4AIABh
AG4AZAAvAG8AcgAgAGkAdABzACAAcwB1AGIAcwBpAGQAaQBhAHIAeQBcKAAt
AGkAZQBzAFwpKQovQ3JlYXRpb25EYXRlIChEOjIwMTIwOTI4MTgwOTU1KQo+
PgplbmRvYmoKMiAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMyAw
IFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovU0Eg
dHJ1ZQovU00gMC4wMgovY2EgMS4wCi9DQSAxLjAKL0FJUyBmYWxzZQovU01h
c2sgL05vbmU+PgplbmRvYmoKNSAwIG9iagpbL1BhdHRlcm4gL0RldmljZVJH
----==_mimepart_5065e7f4af345_a9e43fdbdd45a760153b9--
All of your mimepart boundaries are the same...they're all the 'alternative' boundary.
--==_mimepart_5065e7f4af345_a9e43fdbdd45a760153b9
For an email with HTML, plain text AND attachments, you need to declare and properly encapsulate the separate parts by properly putting the boundaries in their right places. The easiest way to get a grasp of what that looks like is to manually create an email in an email client with all the 'features' you want (HTML + plain text + attachments) and then view the source and take note of how the mimepart boundaries are laid out.
Each "part" of the email source actually declares what the boundary looks like, and then at the end of each part there are one or more of those boundary lines indicating the end of the part. Parts can and should be encapsulated within other parts. It's damn complicated but the take-home note is that in your example, you only have one mimepart declared and used when you should have more (as you indicated in your hierarchy).
Now as for where/when this goes awry, we'd have to see the code you're using to generate the email from start to finish.
Starting with no cache on server or client
FIRST REQUEST
GET /post/1 HTTP/1.1
HTTP/1.1 200 OK
Date: Fri, 05 Mar 2010 09:05:46 GMT
Last-Modified: Thu, 04 Mar 2010 21:00:08 GMT
X-Rack-Cache: miss
Etag: "c226165d5817af7c91592dab0bc0ac63"
Cache-Control: max-age=3600, public
The Cache is missed and Rails gets hit and queries the database:
if stale?(:etag => #document, :last_modified => #document.updated_at.utc) # => true
expires_in 1.hour, :public => true
#post = Post.find(params[:id])
end
SECOND REQUEST
GET /post/1 HTTP/1.1
If-Modified-Since: Thu, 04 Mar 2010 21:00:08 GMT
If-None-Match: "c226165d5817af7c91592dab0bc0ac63"
Cache-Control: max-age=0
HTTP/1.1 304 Not Modified
Date: Fri, 05 Mar 2010 09:10:04 GMT
X-Rack-Cache: miss
Etag: "c226165d5817af7c91592dab0bc0ac63"
Cache-Control: max-age=3600, public
The Cache is missed and Rails gets hit, but this time it sends 304 Not Modified and the database is not hit:
if stale?(:etag => #document, :last_modified => #document.updated_at.utc) # => false
expires_in 1.hour, :public => true
#post = Post.find(params[:id])
end
However I was under the impression this should hit the Cache since the etag matches (If-None-Match/Etag)?
I'm doing a full refresh (F5) so the browser is adding Cache-Control: max-age=0 which is preventing the cache thinking the page is fresh.
It's my understanding that the If-None-Match and If-Modified-Since headers are sent when the browser's cached content expires (the content has been in the browser's cache for more than the maxage in the Cache-Control header). This allows your application to verify that the content is still fresh and if it is, then send the 304 with a new maxage and the same Etag as before.