<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.versionmodified
        {mso-style-name:versionmodified;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;}
span.E-MailFormatvorlage22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hello Alexey,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">we were able to set the „Expires:“ header<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><img width="519" height="251" style="width:5.4062in;height:2.6145in" id="Grafik_x0020_1" src="cid:image001.png@01D6708B.12CB3280"><span style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">But with no success.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">XEP continues to make 3 GET-requests to the media-repository.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Any further ideas?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Fritz<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Von:</b> Xep-support <xep-support-bounces@renderx.com> <b>
Im Auftrag von </b>Alexey Medvedev<br>
<b>Gesendet:</b> Montag, 10. August 2020 16:15<br>
<b>An:</b> xep-support@renderx.com<br>
<b>Betreff:</b> [xep-support] Re: How often does XEP.BAT use my graphic-URL?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Hello Fritz,<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I cannot see any “Expires:“ header<o:p></o:p></p>
</div>
</blockquote>
<p>That's precisely the reason why XEP makes multiple requests. <o:p></o:p></p>
<p><o:p> </o:p></p>
<p>I've set up simple file sharing via "python -m http.server" and inspected XEP's behavior with your fo but referring an image shared via python.
<o:p></o:p></p>
<p>XEP successfully cashes the image in memory while accessing it for the first time, but as there is no
<i>"Expires"</i> header expiration date defaults to 0 which means the resource expires immediately.<o:p></o:p></p>
<p>When XEP needs the image for the second time it can't simply use the data from cache as it's expired, so it sends a request, but set's "<i>If-Modified-Since"
</i>header. But pythons simple http.servers doesn't care about If-Modified-Since and simply sends the image again. XEP checks modification date and as it's the same as cashed data's XEP actually uses cashed data!<o:p></o:p></p>
<p>Actually starting from <span class="versionmodified">Python 3.7 http.server supports If-Modified-Since. So I've updated python and now http.server returns "304 Not Modified" instead of sending "200 OK" and image once again.</span><o:p></o:p></p>
<p><o:p> </o:p></p>
<p>python 3.6.5<o:p></o:p></p>
<pre><img width="544" height="207" style="width:5.6666in;height:2.1562in" id="_x0000_i1025" src="cid:image006.jpg@01D6708C.CBC201F0"><o:p></o:p></pre>
<p>python 3.8.5<o:p></o:p></p>
<pre><img width="552" height="208" style="width:5.75in;height:2.1666in" id="_x0000_i1026" src="cid:image007.jpg@01D6708C.CBC201F0"><o:p></o:p></pre>
<p><o:p> </o:p></p>
<p><span class="versionmodified">Therefore the solution for your issue is to make your server set "Expires" header.
</span><o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Regards,<o:p></o:p></pre>
<pre>Alexey Medvedev<o:p></o:p></pre>
<pre>RenderX<o:p></o:p></pre>
<pre>---<o:p></o:p></pre>
<pre><a href="http://www.renderx.com">www.renderx.com</a><o:p></o:p></pre>
</div>
</body>
</html>