Are there alternative methods to using PHP to retrieve the filename of the current page?

One alternative method to using PHP to retrieve the filename of the current page is to use JavaScript. By accessing the `document.URL` property in JavaScript, you can easily extract the filename from the URL. This can be useful if you want to reduce the server-side processing load or if you are working on a project that heavily relies on client-side scripting. ```javascript var url = window.location.pathname; var filename = url.substring(url.lastIndexOf('/') + 1); console.log(filename); ```