Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

HTML-on-a-prim - how to refresh?

Richard Meiklejohn
Registered User
Join date: 15 May 2006
Posts: 45
10-09-2008 06:58
Hi
I've built a web screen which I'm using for all sorts of things. How can I easily refresh that page in script - if I simply issue another llParcelMediaCommandList for the same URL it seems to get ignored, the in-built browser seems to think 'Ah I already have it, so I'm not going to get it again'. (The script knows the URL as the screen is chat controlled)

The use case is that the screen shows a project page, clicking on the screen launches a content management view of the page in the browser so you can update it.

Possible solutions I'd rather avoid:
- meta-tag or javascript timed refresh (would either have to be too frequent or would
introduce a delay after updating the page)
- displaying a different or blank page followed by the same URL again. (llParcelMediaCommandList introduces a 10 second delay each time the URL is changed so this would be 20 seconds)

Any thoughts appreciated.
Richard Meiklejohn(SL)
Scott Savira
Not Scott Saliva
Join date: 10 Aug 2008
Posts: 357
10-09-2008 07:10
Huh.... I think you can display Flash content this way, right? Maybe do up your content in Flash. Just a thought, I dunno if that'd work.
Pedro McMillan
SLOODLE Developer
Join date: 28 Jul 2007
Posts: 231
10-09-2008 07:52
The most reliable way I've found is to stop and restart the media:

CODE

llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_STOP, PARCEL_MEDIA_COMMAND_PLAY]);


It usually causes a brief flicker to black, but I'm not sure there's a better way I'm afraid.
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
10-09-2008 08:45
This seems happen automatically. At least, I have Antonius Misfit's Parcel Web Browser /54/ff/246637/1.html#post2133106 set up to display the BBC World News front page, and the browser updates itself automatically without any intervention on my part. I've never checked to see how frequently it refreshes itself, but since I noticed this I've often checked, out of interest, what the page looks like in Firefox, and they are always the same.

I may well be missing something, but I can't see anything in the script to tell it how often, if at all, it is supposed to reload the page.

...Ah.. I've just checked. It updates itself for me -- it would seem -- whenever I tp. So presumably if I've been on my building platform all day, and you come and visit me, I'll still be seeing the news as it was some hours ago and you'll be seeing a more recent version.
Richard Meiklejohn
Registered User
Join date: 15 May 2006
Posts: 45
10-10-2008 05:07
Pedro, Thanks - that sounds like the way I'll have to go.

Innula - Web pages can have various mechanisms built into to them that make them refresh themselves such as a tag at the top or some javascript within them. Also, since the embedded HTML-on-a-prim engine supports javascript on pages, some elements of the page can happily update themselves (eg - A clock or a news ticker). What I want is to have my LSL script force a reload of a page that is already being displayed, maybe because the content has changed.

Scott - I think Flash is the one thing that the embedded browser engine will NOT render :-)

Neil Canham
Sharcel Bellic
Greetings, Virtualings!
Join date: 15 Aug 2008
Posts: 127
10-10-2008 05:14
If it's a page you control, could you use two files, one as the current page, one as the new page, and switch which one is current and which is new each time you need to update?