SPECIAL OFFER: Only $69 for access to everything in OSTraining for 1 year! You save $75!  2
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

Using meta tag http-equiv="refresh" content="X"

3 years 10 months ago - 3 years 10 months ago #121785 by Cockroach
While you mention using this tag is for pages which require recalculation, would it be useful as a diagnostic tool to reload a page from the host in which changes are being made to eliminate the refresh step.

Permit me rephrase my question! Where is the page being refreshed from? The host or the page in cache? if it is a recalculation, where are the formulas? Within the page? If it is a reload from the host, then I can understand reloading a PHP either changing stored routines or changing page embedded PHP scripts where database fetches are being made.

You said it can be very helpful. I see it as a tag which can be used during development as things are rapidly changing within the body of HTML, CSS or PHP routines embedded within the page. Changing the refresh interval value can minimize the annoyance.

Thanks in advance,
Roger

Please Log in to join the conversation.

3 years 10 months ago #121850 by Valentin
Hi Roger,

May you elaborate?

In HTML, is used to redirect to another page:
<meta http-equiv="Refresh" content="X;url=http://another-place.any/">
or refresh every certain period of time (60 seconds in the example below):
<meta http-equiv="Refresh" content="60">

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 10 months ago #121859 by Cockroach
Replied by Cockroach on topic Using meta tag http-equiv="refresh" content="X"
Where is the source of this refresh made from? The browser cache or the host? I am thinking of using this for development of code on a host. I would use it to watch the change effect of some PHP code which is sourced from the host & presented to a page. Does that help explain my question?

Please Log in to join the conversation.

3 years 10 months ago - 3 years 10 months ago #121864 by Valentin
The refresh is done from the browser.

Sorry, still I don't understand the use case with PHP, however there is a way to define a refresh from the server with this sample PHP code instead:
header('Refresh: 2;url=http://localhost/test/something.php');
Where 2 means: refresh every two seconds.

Hopes this helps

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!