Home >Web Front-end >HTML Tutorial >A brief analysis of whether using iframe to call a page will cache the page_HTML/Xhtml_Web page production

A brief analysis of whether using iframe to call a page will cache the page_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:37:271884browse

Recently, I had a project that required using an iframe to call pages that change every day. Then I thought about whether the iframe would cache the page, so I wrote a demo to demonstrate it. The results are as follows:

If the src of the iframe is Static pages may be cached, because static pages have 200 and 304 status
If the src of iframe is a dynamic page, it will not be cached, because dynamic pages are all 200 status
The src of iframe is a pseudo-static page If so, you need to analyze whether the pseudo-static page will have a 304 status. If so, it will be cached

I hope it will be helpful to children who encounter the same problem.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn