Does ASP's response. Redirect to the XML file actually look like this?

Source: Internet
Author: User
After one night, we came to the conclusion that:

Create an ASP file, asppage1.asp.
<%
Response. Redirect "http://community.csdn.net/Expert/topic/3237/3237715.xml"
%>

Then, create a virtual directory to browse this asppage1, you can see the page Jump to the http://community.csdn.net/Expert/topic/3237/3237715.xml

The address bar is correct, but right-click it and check whether the Address URL still contains the URL of asppage1?

So there is a problem! (This was the same thing last night)

For example, there is something submitted to an update. ASP, and this page update will have trouble redirect to an XML file after updating the data, and then press F5 on the XML to jump to. I guarantee that the update will be executed again! Of course, this is the submitted empty data! However, if we handle NULL data errors on this page, the user will be given an error message! It's disgusting!

Therefore, to sum up, if you want to jump to an XML file, you must

script language = JavaScript >

window. location = " XXX. XML? Id = " + math. random ();
// -->
script >

In this way, the above problems will not occur!
ID has no practical significance. It is forced to refresh XML. xml files can always be cached well.

Summary of a little experience ........................

Related Article

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.