Picture of Paul Silver

Paul Silver

Making websites for companies and helping advertise them

Forms

The issue is, basically, that there is a fine line to balance when building web pages. If you have a line of select boxes to show, as a form of dynamic breadcrumb trail, as it were, do you load all the options in to the page when it first loads? The visitor to the page may never use them, so they have loaded in that data, some of which may take lengthy database queries, for no reason. Also, if they are on a phone, they may have used more of their data allowance than really necessary, given they've loaded in what could be a lot of options in the form fields for no reason.

More hoonenoodles

We have another problem as well, that search engines, at least Google, now prefer a page that loads in quickly, that is snappy. If you're doing a load of, potentially quite complicated, database queries when the page loads just to fill in an area the visitor may never click on, well, that slows the page down. Both running the query and downloading the data makes the web page a little slower.

So, here we are, on an example page where I am trying to judge whether search engines will run the Javascript as if they have clicked on the drop down lists, and therefore load in all of the data. It has some slightly odd phrases on the page to help me track down which may perform better when being searched on, and in size tests. I can't assess page load time yet as it's not linked up to the right database.

Now, I wish you a fond quacklesizzlesticks, and adieu.

An alternative to this way of doing it.

© 2024 Paul Silver & Silver Web Services Ltd