Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refresh Page Automatically

I will be creating a JQuery slide show, but need the page to refresh every 5 minutes to change the content.

I know I can do this via some Javascript, but this can be altered on the client side to avoid page refreshes. Is there a way for the server to timeout a page and force a refresh?

like image 667
Somk Avatar asked Jul 22 '12 21:07

Somk


People also ask

How do I automatically refresh a page in Chrome?

Open the Google Chrome browser and make sure you can access the Deep Security Manager console. Click the three vertical dots on the upper-right corner and select Settings. Select Extensions and click Get more extensions at the bottom of the page. Search for the Auto Reload Page Extension and click Add to Chrome.

Can I make a tab auto refresh?

Tab Auto Refresh. Tab Auto Refresh is a browser addon that helps you automatically reload (refresh) tabs of your choice. To operate with this addon, please open toolbar popup UI while you are visiting a website. Adjust time interval in seconds (i.e. 120 sec) and you are all set.

How do I get my web page to refresh every 5 seconds?

Go to the webpage, right click and select Reload Every.


1 Answers

In addition to a javascript reload, you can send a refresh header:

header("Refresh: 300;url='http://thepage.com/example'");

The browser will redirect after 300 seconds regardless of javascript. It can be disabled in configuration of the browser though, but it's not commonly disabled.

like image 142
Esailija Avatar answered Sep 20 '22 02:09

Esailija