简体   繁体   中英

Is there a way to refresh page without using jQuery?

I'm still looking for way to automate refresh in my page. But I'm confused on how to solve this problem without using jQuery and solving it using Laravel 5.3 functions. If someone knows how to solve this please help. It would be great. Thanks in advance.

this is JavaScript basics.

Try this:

<body onload="if (location.href.indexOf('reload')==-1) location.replace(location.href+'?reload');">

header("Refresh:0"); should do the trick. (In PHP)

location.reload(); should do it in plain old js.

These are the way you can reload page :

window.location.reload(); in JavaScript

in HTML (where 1 = 1 second).

window.location.reload()

location.reload(true/false); If false, the page will be reloaded from cache, else from the server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM