php - best practice to cache dynamic content at client side -


sorry that, concluded decision it's better ask directly browsing tons of pages in vain. i've looked through enough resources, haven't found decent explanation fulfill curiosity simplest question. assume there’s uri located @ – hhtp://example.com/example (including php script, queries database). let’s imagine i’ve loaded in browser, click link , hit “back” return hhtp://example.com/example

as far can allow myself understand happens behind scene looks smth this: after “back” been clicked there browser checks cache hhtp://example.com/example matches requested file (after “back”) , finds out wasn’t changed within short period of time since first time loaded , returns cache.

wait!!!! file contains server side scripts, database queries , forth. should again reach web server, request same data mysql , output in file.

so what’s best strategy cache dynamic content preferably on client-side vs server-side? in cases makes useful cache content @ server-side, , practice best?

please can provide resources covering subject can conceived such dumpers , refute or adjust scheme above happens.

while browsing issue run 1 service - http://gtmetrix.com/ liked much, there smth mentioned making ajax request cacheable – may assume can used client-side caching of dynamic content retrieved database. can please acknowledge or deprecate?


Comments