Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I check whether a page is cached by the browser?

browser cached page
0
Posted

Can I check whether a page is cached by the browser?

0

There is no direct Javascript interface for checking the contents of the browser’s cache. It would be a security hazard if you were able to probe the contents of the users’ file system. But there are indirect techniques you can use to track pages people have visited on your site, which are likely to be cached. The key way to record that an HTML document or image has loaded is the onload event that is triggered when the download is complete. These Javascript events can be assigned an event handler function to be called when the event occurs. The event handler function may then store the page information in a cookie.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123