Search code examples
databasehtmlstoring-dataonline-store

How big online shops store product pages


just a question from curiosity. How big online stores with lots of products (can) store their product pages?

I know one solution might be database and then generating the content on demand, but how would they be able to hand URL requests like www.onlinestore.com/productname.htm? (Specificaly I mean this store http://www.alza.cz/pevne-disky/18842851.htm ). Every product links to productname.htm page.

Is it possible (and viable) to have all product pages pregenerated?


Solution

  • The answer will vary from vendor to vendor, but typically this is achieved with a combination of custom URL routing, and a server-side, database-driven language like ASP.NET or PHP.

    In the case of your example, it is likely that the "18842851" of http://www.alza.cz/pevne-disky/18842851.htm is actually a product Id, and their server is parsing that product Id in order to get the correct product content from a database. With the content in-hand, the server can then return a reusable template.