I am working on adding some functionality and streamlining speed for a website. My first task is to determine where the website is drawing its data from first when loaded: the web or the database. This is the first time I have gone deep into the code of an actual website so I'm a bit lost trying to navigate how I can determine this. Is there an easy way to determine where the website is drawing its data from first? Any tips on how to approach large amounts of code such as this are greatly appreciated!
Asked
Active
Viewed 523 times
0
-
Does this answer your question? [Simplest way to profile a PHP script](https://stackoverflow.com/questions/21133/simplest-way-to-profile-a-php-script) – msg Oct 07 '20 at 01:02
-
1It will *always* load from the web first; you have to call the database manually. Webpages (like all code) process top-to-bottom. Just start from the top, and follow each of the code-paths through, assuming you have access to the code. – Obsidian Age Oct 07 '20 at 01:04
-
Can you give us some more info about how the site was built? Is it based on a framework, WordPress, etc. or is it build by hand? Is it publically accessible? Can you share the URL with us? – waterloomatt Oct 07 '20 at 01:04
-
It was built by hand by some students at another school. I do not believe the other school ever released it to the public so I have no way to share it. The copy they gave us only operates on a VM. – ConfusedDatabaseTable Oct 07 '20 at 01:12
1 Answers
1
You can take a look at the API calls done by the website(which in case of chrome is network tab, besides console). Detailed information is given out there about the network calls done including type of call is done.
In your case, I'm assuming there'd be call for either cases.
You can analyse precisely about it from 'Network' tab. If its a DB call it'd make a request to one of the API's of the application, otherwise the web.

Ganesh Jadhav
- 712
- 6
- 22
-
Thanks so much for this! What might calls to the web look like? Or should I just look for calls that are not one of the API's? – ConfusedDatabaseTable Oct 07 '20 at 02:00
-
By web, let's say your website make a request to google(www.google.com/search?q=something), then that call would be indicated in network tab. – Ganesh Jadhav Oct 07 '20 at 02:49