Java scripts for updating web pages

By incorporating refresh code with a Java Script function, you can trigger a refresh at any time that makes sense to your web application.

The above examples will only work as long as the user has Java Script enabled on their browser.

Here's a basic example of using a "confirm" box to ask the user if it's OK to refresh the page.

j Query is already included in the core of the site, linking to another version will cause conflicts.

To include a 3rd party script, we have a special function for this. Our scripts expect AMD, so importing a script traditionally in the source will likely break.

This will refresh the page without any user action and allow you to change the content on the server-side. Have your HTTP server send this header in the response“Refresh: 1; url=/apis/pool_system_snapshot\n”"Set-Cookie: app-state = xyz; Path=/; \n\n"Replace “apis/pool_system_snapshot” with your own server-side URL.

The page will refresh until your server stop sending the “Refresh” header.

Leave a Reply