How can I get the current page format? I mean, if im in
abc.com/index.html
How could I get that the page is on index.html instead for example index.jsx / index.php? I could try to split the URL after the '.', but if the link is on the index it wont show. Any help would be appreciated.
You can't.
If you ask the server for the resource at / then you get the resource at /.
The server won't tell you if it generated it from a file called index.html or index.php or default.php or some logic internal to the server which doesn't involve loading a specific file at all.