[xep-support] Re: How often does XEP.BAT use my graphic-URL?

Kirch Fritz Friedrich.Kirch at it2media.de
Wed Aug 12 00:41:48 PDT 2020


Hello Alexey,

we were able to set the "Expires:" header

[cid:image001.png at 01D6708B.12CB3280]

But with no success.
XEP continues to make 3 GET-requests to the media-repository.
Any further ideas?

Fritz
Von: Xep-support <xep-support-bounces at renderx.com> Im Auftrag von Alexey Medvedev
Gesendet: Montag, 10. August 2020 16:15
An: xep-support at renderx.com
Betreff: [xep-support] Re: How often does XEP.BAT use my graphic-URL?


Hello Fritz,
I cannot see any "Expires:" header

That's precisely the reason why XEP makes multiple requests.



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.

XEP successfully cashes the image in memory while accessing it for the first time, but as there is no "Expires" header expiration date defaults to 0 which means the resource expires immediately.

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 "If-Modified-Since" 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!

Actually starting from 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.



python 3.6.5

[cid:image006.jpg at 01D6708C.CBC201F0]

python 3.8.5

[cid:image007.jpg at 01D6708C.CBC201F0]



Therefore the solution for your issue is to make your server set "Expires" header.

--



Regards,

Alexey Medvedev

RenderX

---

www.renderx.com<http://www.renderx.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20200812/6c78b0aa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 9393 bytes
Desc: image001.png
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20200812/6c78b0aa/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.jpg
Type: image/jpeg
Size: 28253 bytes
Desc: image006.jpg
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20200812/6c78b0aa/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.jpg
Type: image/jpeg
Size: 27472 bytes
Desc: image007.jpg
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20200812/6c78b0aa/attachment-0003.jpg>


More information about the Xep-support mailing list