Passing parameters

I’ve tried to build this site as efficiently as possible and to maximise re-use of code wherever I can. As a result most pages are constructed ‘on the fly’ on the server when a visitor requests to look at them, plugging in the parameters that the visitor has selected. For instance, there is no page within the galleries that shows, say, all the birds of Costa Rica. However, there is a page that will show all the [selection] of [location]. This single page is shown regardless of what the visitor chooses, and it is just the parameters that the visitor chooses that determine how that page is rendered, and which images they see. In order to make this possible it is necessary to pass parameters from one webpage to another. I chose to pass this data around in the URL. The benefit of this is that a visitor can copy or bookmark a URL at any page on the site, and have confidence that the page they are looking at now will be the same page that they are returned to at a later date if they input the same URL. The downside of this approach is that it can lead to some pretty lengthy URL strings (just spend a couple of minutes browsing Amazon and look at the URL as you browse!). I’ve been working my way through the site making changes to the way this data is passed around and to the way that URL strings are constructed. This is still ongoing but I hope to have it finished shortly. Regardless how long it takes, for the most part it shouldn’t impact the functionality of the site while I work on it.

*update* I think this work is now complete. Everything should be working as before, although URLs will look a little different in places.

Previous Post

PageSpeed = 100%

If you're one of the very few who read this section of the site (what's wrong with you?!) then you'll know I like to measure the optimisation of my site with GTMetrix. Getting as close to a 100% score on the PageSpeed test has been something to work towards as ... Read more

Next Post

Brave & B.A.T

This site is now a 'Brave Verified Creator'. By becoming a Brave Verified Publisher, the site joins over 240,000 publishers and creators on the Brave platform able to receive Basic Attention Token (BAT) donations from Brave’s over 7 million monthly active users. Brave is a free and open-source web browser developed ... Read more

Skip to content