How to refresh a page from Windows scheduled tasks? - windows

we have a computer which only purpose is to display a web page on a big screen. This page has a calendar, which reloads its data every 60 seconds. The whole page reloads after 60 minutes. Both of these reloads are called from jQuery by setInterval(); function.
This all works fine, but sometime the connection to the server is lost and then there is this message Connection lost shown on the big screen with some hints and a button to reload the page (on Firefox).
Is there a way, how to reload this page (or a tab in Firefox (or other browser)) with a Windows at command (scheduled task) automatically every X minutes? Or do you have other tips or solutions how to make sure that the page is always shown?

For firefox:
use https://addons.mozilla.org/en-us/firefox/addon/tab-auto-reload/
For chrome:
use https://chrome.google.com/webstore/detail/easy-auto-refresh/aabcgdmkeabbnleenpncegpcngjpnjkc?hl=en
To display a website, I think 1 of this 2 browser will do the trick.
Personally I am using firefox to display computer lab timetable in my institution.

Related

How can I enable autoplay (not initiated by user) in Firefox?

I have one page that launches another page, and the launched page does a series of scrapes and then plays an audio based on the results.
This stopped working today, maybe because of a Firefox update, but I need to be able to enable auto play as it is critical that the audio plays when the launched page loads.
Here is what my current JavaScript code looks like:
function playHighRiskStock(){
var highRiskStock = new Audio('./wav/high-risk.wav');
highRiskStock.play();
}
It is now giving me the error: NotAllowedError: The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
It did this all-of-a-sudden (i.e. it was working perfectly yesterday autoplaying with no problems).
How do I configure my browser to allow autoplay, even if not initiated by the user?
I have looked at this page: https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide but it doesn't give any actual JavaScript code examples on setting auto play.
I got the same error in Firefox. The following fixed it for me. Didn't need a reboot or to reload the browser.
Click the Hamburger (Options Menu).
Pick the Options menu.
In the search textbox, enter "Sound".
A "Block websites from automatically playing sound" option will appear.
Either uncheck that option or click the "Exceptions" button beside it. In my case, I added an exception for https://app.pluralsight.com. It works fine now.
Another option is to use Chrome.
Good luck.

New Tabs are opening randomly in browser

I use Chrome as my browser and for the past week or so, tabs have been randomly opening when I start Chrome, sometimes as I'm browsing. It started with a tab opening one day as I was watching a video, I clicked on it thinking it was a popup (like the ones that come up when you click somewhere on a website, the ones that AdBlock miss) and it was just some random forum I've never seen before. I closed it, then forgot about it. Ever since then, the same thing has been happening - random tabs will open, sometimes just 1 or 2 but sometimes there's at least 10, opening all at once.
what should i do to get rid of this problem?
when i run chrome this popup appear
Maybe you clicked to a link which automatically ran some malwares and installed or hooked some bad scripts into your system. I used to get same issue and I have to re-install my windows (re-install Chrome only didn't work)

Is it possible to set up a first time splash screen?

Is it possible to use a certain image for a loading screen when it's the first time the app is ever opened, and then after that use a different image for the loading for all visits after that?
Basically I'm creating about 10 files (not large in size) when the app is first launched and I wanted to display a message to the user so they don't think that the app normally takes more than a second to load up. I know I can display a popup on the home screen, but I have an animation that fires when you go to the home screen and also I need those files created before the user arrives there. Any ideas? Or maybe a different view point that I didn't mention?
You can't change the splash screen. Maybe you should rethink how your initial 10 files are created, and take Paul's suggestion of showing a popup control while you do the work, or better yet, offloading it into the background? I guess it depends if your created files are required for something in the UI
--edit--
Actually, the more I think about it, the more I favour a background thread doing the work while you have a popup control displayed to the user. It would allow you to give the user feedback on what is actually going on. If your popup says something like "Preparing this application for its first run...", and then shows a progress bar that updates when each file is created, the user is getting feedback on exactly why the app is taking so long to load the first time. Otherwise they may think "This app is very slow, I wonder if there is a better one out there"
I'm not sure if this is what you were thinking when you said "Popup", but you could create a full screen Popup (in the System.Windows.Controls.Primitive sense of Popup) that completely covers your main UI so that the user can't see it.
Your temporary loading UI would be defined as a UserControl described in XAML/C# in the same way as a normal PhoneApplicationPage.
When your files are ready and you close the popup you should send a message to the View (i.e. .xaml.cs) of your main page that will cause the animation to be replayed with all contents visible.

IE: When clicking Google +1 a new window opens and then tries to close again

I have recently introduced some Google +1 buttons to my site.
I am calling the button like this:
<g:plusone size="small"
count="false"
callback="plusone_vote"
href='http://www.mysite.com'>
</g:plusone>
The plusone_vote callback is a js function which pushes a tracking event to Google Analytics.
This works for the majority of users. However, a small number are getting an issue. When they click on the +1 link a new IE window appears and then displays the message
"The webpage you're viewing is trying to close this window.
Do you want to close this window?"
If the user clicks "No" they get they Google +1 privacy page ("I'm fine with Google using my +1's and other info around content and ads on non-Google websites"). They can then click the "Share my +1's button" and the window closes. However, they "+1" action never appears to happen. The button does not turn blue and the page does not show up in their profile.
The users were all using IE8 or IE9 on Windows 7 - a combination which works fine for most users. The only thing that appears to be the same is that they all use the same type of laptop - I'm struggling to see the significance of that though.
Any ideas?
The actual issue is with your IE security settings: the page MUST be displayed as a regular 'internet' webpage in order for IE to correctly run the +1 and Facebook Like plugins without this error message.
In order to fix this:
Go into Internet Options in the IE menu
Go to Security Settings. Click on 'local intranet'.
Click on sites. Make sure 'detect local intranet' and all it's sub checkboxes are unchecked. Go into 'advanced' and make sure your webpage's domain is not listed. Close this window.
Now, click on 'Trusted Sites' and then 'Sites'. Make sure to remove your site's domain if it's listed.
All sites which are not 'Intranet' or a 'Trusted Site' default to public internet settings, which is the same as what your users will see (unless you're writing a business application which runs for internal network users, I suppose). This should fix this pop up, and allow +1 and Facebook like plugins to function correctly.

Why does Application_Deactivated not get called on a pivot page?

For my Windows Phone 7 app, I have a main panorama page which opens up into a pivot control. The main panorama page correctly calls Activated/Deactivated, and restores correctly.
But after visiting the pivot page, pressing the Windows key doesn't call Deactivated.
When the app is relaunched with the back button, it goes right to how the page looked before tombstoning, but Activated is not called, and the page is not usable, and the back key doesn't work.
Has anyone else experienced this problem before?
If you just go to the Start screen then your application MAY not get tombstoned. This is expected behaviour.
If you open another application or open search from within your application you should experience tombstoning.

Resources