M
M
murrometz2015-10-23 11:37:22
JavaScript
murrometz, 2015-10-23 11:37:22

How correct is it when using the History API and AJAX to store the received data directly in history?

Pagination and filter on ajax.
Ajax gets the content and replaces the main div. The average size of received data is 35 kb.

After ajax is called

window.history.pushState({content:msg, type:'sale', link:current_page_link}, current_page_link, current_page_link);

where msg is the received data

After clicking the Forward/Back buttons in the browser, the content is immediately inserted into the page.

I plan to implement this functionality on almost the entire site where pagination and filters are used.

How correct is it to store the received data directly in history?

I'm afraid this may cause large memory overlays.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sivabur, 2015-10-23
@sivabur

Not right. History - for History.
To store data, you need to use cache, cookies, and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question