bradleykirby / WallaceTheme

An experimental WordPress theme built with the Rest API and Angular.
GNU General Public License v3.0
135 stars 20 forks source link

Absence of trailing slash causes 301 and suboptimal loading #16

Open MartinMalinda opened 7 years ago

MartinMalinda commented 7 years ago

The client side router create url like this: https://demo.wallacetheme.com/2016/11/23/engineering-informatics

While WordPress expects a URL with trailing slash like so:

https://demo.wallacetheme.com/2016/11/23/engineering-informatics/

Absence of trailing slash causes a 301 redirect and usually adds a few hundreds of milliseconds to the initial page load.

I had to deal with this in Scribe recently so I noticed it's an issue here as well.

bradleykirby commented 7 years ago

Interesting, thanks for the report.

I'll take a look at appending a trailing slash in the client router. I seem to remember there being some issue with trailing slashes in the angular router which is why they're not currently included. I'll see if that's been resolved.