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.