Webpage media

Asked by Sam B

I would like to get some info on how client behaves when it comes to webpage media.
I was going through some previous answers but still need some clarification.
My understanding is that every time when region with webpage media loads client connects to
desired url and displays "fresh" page in the region.In my case since webpage in question changes only every
2-3 hours it would be great if i could setup client to access webpage only once in that period of time instead
( in my current layout) every 5 min. Is that possible with python client? Is there any caching of the webpage on the
client side so even if internet connection is not available for 1-2 hours, client would still play webpage media without
live connection? In one answer it was said that internet explorer may or may not cache certain content. Assuming that
 is regarding windows client, what could I expect in python client( browser type ?)?
Thanks.
O, by the way! XIBO is the best software out there! Keep up good work!

Question information

Language:
English Edit question
Status:
Solved
For:
Xibo Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Harrington
Solved:
Last query:
Last reply:
Revision history for this message
Dan Garner (dangarner) said :
#1

There is currently no caching in either client aside from the caching
provided by the browser that is embedded (in the case of the .NET
client this is IE and IE will usually cache scripts/images from a web
page). I believe (Alex will confirm) that the python client doesn't
cache any of the content at the moment.

I don't believe there are any blueprints currently registered for
extending this functionality but it would seem that what you need is
the ability to download the entire website locally and to serve that
content until the "time-out" period expires.

Please feel free to register a blueprint for this - my initial
thoughts are that it would be quite complex. If you would like to
sponsor the development of this ahead of the current Xibo roadmap
please email us directly (<email address hidden>) and we will see if it is
something we can do.

Revision history for this message
Alex Harrington (alexharrington) said :
#2

The python client uses an in-memory cache and at the moment we have no
control over what it caches.

The only way to affect its behaviour is for the web server to modify the
cache control headers so the content is never cached in the first place.

Alex

Revision history for this message
Sam B (begsam) said :
#3

Hi Dan and Alex,
Thanks for replay.
Is the following info up to date?
Install Guide Python Client
"Known Issues
Webpage media items are loaded once per run of the client and then served from cache (unless the HTTP headers instruct the client not to cache the content at all). This means that webpages are never refreshed.
Tickers animate poorly.
Tickers in single mode don't transition 100% correctly.
All of these issues are tied to the use of Awesomium for browser embedding. We need help to move us over to the newer Berkelium license. Please see [9] for more information or to help out!"

Some testing showed this:
After starting client webpage loads in the region. If internet connection becomes unavailable, webpage still shows fine for 1-2 min and then weird thing happens. On each region loads webpage displays once properly with css styling and then on the next run without styling. It keeps switching constantly. It looks like that webpage text gets cached but css( imported file) get discarded after some time.
At this point I am satisfied with the fact that webpage actually gets cached but I need to figure out problem with css.

Revision history for this message
Alex Harrington (alexharrington) said :
#4

Yes, that's still accurate.

The version of Awesomium we're using gives us no control at all over
the caching in the client, so I'm afraid you'll have to take it as you
find it. There's nothing I can do to change it's operation.

Alex

Revision history for this message
Sam B (begsam) said :
#5

Thanks Alex.

Revision history for this message
Sam B (begsam) said :
#6

So far no luck with getting webpage refreshed. Awesomium just keeps accessing cache regardless of explicit "no cache" in the header of the webpage. Is there any way to restart Awesomium browser by automatic script in regular intervals? Maybe it is crazy idea but I ran out of smart ones.
Thanks.

Revision history for this message
Brian Mathis (bcmathis) said :
#7

What code are you using to refresh your page? I have used this set of code
(place it above the first <html> tag) in my weather script and it works for
me:

<?php
header("Expires: Fri, 01 Jan 1990 00:00:00 GMT");
header("Pragma: no-cache");
header("Cache-Control: private, no-cache, must-revalidate");
header("Vary: *");
?>

Also, you might need to add

<META HTTP-EQUIV=Refresh CONTENT="XX">

to the header info; changing XX to your refresh time in seconds to tell the
webpage to refresh itself.

- Brian

On 31 March 2011 10:16, Sam B <email address hidden> wrote:

> Question #151147 on Xibo changed:
> https://answers.launchpad.net/xibo/+question/151147
>
> Status: Answered => Open
>
> Sam B is still having a problem:
> So far no luck with getting webpage refreshed. Awesomium just keeps
> accessing cache regardless of explicit "no cache" in the header of the
> webpage. Is there any way to restart Awesomium browser by automatic script
> in regular intervals? Maybe it is crazy idea but I ran out of smart ones.
> Thanks.
>
> --
> You received this question notification because you are a member of Xibo
> Developers, which is an answer contact for Xibo.
>

Revision history for this message
Alex Harrington (alexharrington) said :
#8

Cache control in the page makes no difference. As far as I know the only
thing that influences it is the HTTP headers.

Revision history for this message
Sam B (begsam) said :
#9

Hi Brian,
In python client I use webpage media type with url pointing to my website which displays weather info. Regardless of "no-cache' in the header, client access website only when it runs for the first time. After that it serves all the time same content from the cache. Actually it runs without any problem even without internet connection( initially I was excited to have that working, now that is the major problem). From webpage stats I can see that client does not contact website at all after initial load.
Are you using webpage media or embedded type?

Revision history for this message
Best Alex Harrington (alexharrington) said :
#10

As I said before, cache control in the page makes no difference. As far as I know the only thing that influences it is the HTTP headers.

There's a long thread in the answers section between me an PV Anthony where we figured all this out. I suggest reading that.

Revision history for this message
Sam B (begsam) said :
#11

After configuring mod_expire for webpage in question now I am able to control when client pulls new data.

Revision history for this message
Sam B (begsam) said :
#12

Thanks Alex Harrington, that solved my question.

Revision history for this message
Man in the mirror (info-au) said :
#13

Hello guys,

How can I display this website or script in one of the TV screens. How should I configure Xibo? So far no luck with that.

I want to display this page. http://parnu.au.ee/info.htm

This page is actually javascript. Code is here:

 <script type="text/javascript">var knembedconfig = {filter:{pl:"2870"}, css:{bgcolor:"#ffffff", clink:"#3489c8", flink:"#ffffff", text:"#000000", ttext:"#222222", lgray:"#efefef", dgray:"#3489c8", fontf:"Arial,Helvetica,sans-serif", fontb:"13", fontm:"13", fonts:"12", fontt:"11"}, act:{listimage:true, eventmap:false, placemap:true, displaytitle:false}, text:{displaytitle:"S\xFCndmused:"}}</script>
<script type="text/javascript" src="http://www.kultuuri.net/js/embedbox.js"></script>

This webpage shows whats going on at the Cinema. Today...those movies..... Tomorrow... those and so on..

Auto refresh is required.

Best Regards

Revision history for this message
Alex Harrington (alexharrington) said :
#14

Add a region, add a webpage media item to the region and then paste
your webpage link in to the URL field.

Job done.

Alex