Site icon Hip-Hop Website Design and Development

PHP solely as a sort of dynamic renderer?

Recently I have been excited about easy methods to implement single-page purposes (SPAs) within the WordPress surroundings. Since I’m not very aware of WordPress development, I hope you can provide me a couple of ideas, consider my ideas and perhaps acknowledge one or the opposite pitfall that I’m overlooking.

In precept, SPAs ought to be capable to be carried out with none issues due to the REST interface. The most important drawback appears to me to be solely the search engine optimisation half, since apparently SPAs are nonetheless not absolutely supported. For instance, Google recommends utilizing so-called dynamic rendering. I’ve learn quite a bit about totally different methods and middleware ideas that make this potential, however both price cash or contain a certain quantity of effort. So the thought got here to me to easily use the traditional construction of WordPress in reference to PHP as a renderer. For instance, relying on the worth of the user-agent header, you possibly can ship regular PHP-based HTML pages or the entry level for the JS-based SPA. For instance, by configuring the Apache internet server accordingly. Is that this strategy conceivable?