Questions about ajax pre-loading pages

Source: Internet
Author: User
Ajax pre-load page problems. There is flash in page B, which is a little slow to open. Page A contains the link to page B. now I want to use ajax to secretly load page B when I open page A. But when I open page B again, the speed is still slow. it seems that the browser does not cache the content of page B. The code on page A is as follows: JScriptcode $ (the problem of pre-loading the page with doc ajax.
There is flash in page B, which is a little slow to open. Page A contains the link to page B. now I want to use ajax to secretly load page B when I open page A. But when I open page B again, the speed is still slow. it seems that the browser does not cache the content of page B. The code on page A is as follows:
JScript code
      $(document).ready(        function (){            $.ajax({                type: "get",                url: "/img/"+url_part,                data: "",                success: function(msg)                {                    }            })                    });


------ Solution --------------------
You cannot calculate the cache. The value returned by ajax is not obtained when you access page B.
------ Solution --------------------
You can hide an iframe...
------ Solution --------------------
However, ajax does not write the cache.
------ Solution --------------------
Ajax can set up cache! I think loading with ajax will lead to a slower display speed on page B. Originally, ajax is not suitable for uploading big data!

Can the flash browser generate a cache?
------ Solution --------------------
So the browser is like this. Not only flash, but also html web pages will be cached.
------ Solution --------------------
Discussion

Reference:

You can hide an iframe...
If page A is A list page, each record has A hidden iframe, which will definitely affect the opening speed of page.

------ Solution --------------------
I heard that jq has a cache parameter.

Cache: true
------ Solution --------------------
Browser buffer writing is an inevitable built-in function. if your flash is a swf suffix, it will be cached.
Unless there is a forbidden cache header

But I am skeptical that js can write browser buffer. If yes, can I write any file to the user's hard disk?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.