On my website I use a regular php page and if it requests Ajax it doesnβt include the header and footer, it just returns the content (body) and includes it.
If the content is retrieved from the database, you can create a regular page that retrieves the content and program for Ajax only.
Think, if you disable Javascript, your site will continue to work.
Atika source share