Welcome Guest, Not a member yet? Register   Sign In
codignighter ajax history
#3

(01-09-2017, 02:24 AM)ivantcholakov Wrote: It would be a long explanation. Generally,

1. for every button/link that updates a HTML fragment through AJAX you need to have also a URL that would make possible rendering the whole updated page through a normal HTTP-request;
2. the AJAX handlers that update HTML fragments should manipulate the browser history, using the URL that I've mentioned before.

This could be done manually (but it requires careful work and experience), also external components for this purpose could be adapted, see:
pjax - https://github.com/defunkt/jquery-pjax
a more complicated implementation: https://github.com/falsandtru/pjax-api

See this page: http://iridadesign.com/starter-public-ed...round/pjax When you click on the submenu, only a fragment of the page gets updated (the title is not updated, the example is not precise). The browser line (the link) gets updated too, with this (bookmarkable) link you can reload the whole page. Browser history works too.

There is also Turbolinks project https://github.com/turbolinks/turbolinks , but I have no time to see whether it is applicable on PHP.

thanks you for these references ill look into this .
Reply


Messages In This Thread
codignighter ajax history - by Marcel - 01-09-2017, 01:14 AM
RE: codignighter ajax history - by ivantcholakov - 01-09-2017, 02:24 AM
RE: codignighter ajax history - by Marcel - 01-09-2017, 02:28 AM
RE: codignighter ajax history - by spjonez - 01-09-2017, 06:49 AM
RE: codignighter ajax history - by skunkbad - 01-09-2017, 04:43 PM
RE: codignighter ajax history - by Marcel - 01-11-2017, 05:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB