A small bug shows how the browser kernel loads pages

Source: Internet
Author: User

Recently, I encountered another confusing problem. Accessing the same page in different browsers may have different problems.

The Firefox and IE browsers are normal, but the verification code will not pass the verification no matter how it is accessed using the WebKit kernel browser.

View server logs and find that the submitted data is the same.

Then carefully analyze the logs and find that the loading process is different:

The WebKit process is as follows:

processing charmscontroller # index (for 127.0.0.1 at 17:37:25) [get]
processing simplecaptchacontroller # simple_captcha (for 127.0.0.1 at 17:37:29) [get]
processing sitecontroller # show_page (for 127.0.0.1 at 17:37:30) [get] // error 302
processing charmscontrolle R # index (for 127.0.0.1 at 17:37:31) [get]
processing sitecontroller # show_page (for 127.0.0.1 at 17:37:32) [get] // error 302
processing sitecontroller # show_page (for 127.0.0.1 at 17:37:33) [get] // error 302
processing charmscontroller # Index (for 127.0.0.1 at 17:37:35) [get]
it was found that the index was loaded three times, resulting in the verification code updated three times (the verification code will be updated when you access the index) but it is loaded only once.

Firefox and IE kernel loading process:
Processing charmscontroller # index (for 127.0.0.1 at 2011-04-29 17:37:25) [get]
Processing simplecaptchacontroller # simple_captcha (for 127.0.0.1 at 2011-04-29 17:37:29) [get]
Processing sitecontroller # show_page (for 127.0.0.1 at 17:37:30) [get] // error 302 occurs here
Processing sitecontroller # show_page (for 127.0.0.1 at 17:37:32) [get] // error 302 occurs here
Processing sitecontroller # show_page (for 127.0.0.1 at 17:37:33) [get] // error 302 occurs here

However, in IE, the index is only loaded once.

I don't know why WebKit loads the same page three times. Is it because of the 302 error?
I just tested it again and added all the images I couldn't find. The page is loaded only once. It seems that WebKit will request the page again when there are images on the page that cannot be found, however, I did not test the number of times.

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.