S
S
Sanzhar Bazarbek2021-04-15 22:00:01
AJAX
Sanzhar Bazarbek, 2021-04-15 22:00:01

How to run ajax on both sides of the page load?

Good afternoon! There is a site in which the link "a" goes to a subpage of the site via Ajax
But if you go back, then the link changes - but the visible part itself does not. How to be?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
yarnstart, 2021-04-16
@yarnstart

HTML5 History API
onpopstate - catch "go back" event and do ajax on current url -> change content

T
Timur Khudiyev, 2021-04-16
@t_khudiyev

Use good old pjax or barba js)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question