Should I use PHP or Javascript for page refreshing?

I would like to ask for your opinion on the topic. I can make my page refresh with both of these methods, but I do not know if they have any drawbacks. So, which one should I use?


I'm talking about header('Refresh:0') in PHP and location.reload() in javascript.(Sorry, I forgot them first)


The draw back with doing this via JavaScript is that you are limiting this feature to users who do not have JavaScript running in their browser. If it's important that the page refresh for all users then I would suggest not doing it via JavaScript.

Doing it via PHP would run for all users, but the bigger question is why do you need to refresh the page? And could you achieve the same thing without refreshing the page?

Need Your Help

Adb for arduino UNO

arduino adb arduino-uno arduino-ultra-sonic

i am working on a distance sensing app for android using arduino and ultrasound sensor.I found code that uses Abd for communication between android and arduino. The Abd used is for Arduino mega whi...

Django virtualenv deployment configuration

django mod-wsgi virtualenv virtualenvwrapper

I recently start to use virtualenvwrapper and created