How To Reload a Page Using JQuery or JavaScript

location.reload(); ~or~ window.location = window.location.pathname;
![]() |
location.reload(); ~or~ window.location = window.location.pathname;
var pathname = window.location.pathname;
1 2 3 |
setTimeout(function() { window.location.href = "/index.html"; }, 4000); |
Various Ways to Obtain Various Information:
1 2 3 4 5 |
jQuery(document).ready(function() { var Path = window.location.pathname; var HREF = jQuery(location).attr('href'); var Title = jQuery(this).attr('title'); }); |
To generate a redirection header in CGI.pm use the following syntax where $q is the cgi handle: print $q->redirect(‘http://wyzaerd.com/documents/resume.pdf’); If you use redirection like this, you should not print out a header as well. You should always use full URLs (including the http: or ftp: part) in redirection requests. Relative URLs will NOT work correctly.