javascript - On the purchase page of an e-commerce website, after selecting options such as color, style, quantity, etc., what is the best way to submit these data to the order generation page.

WBOY
Release: 2016-08-18 09:15:58
Original
975 people have browsed it

Should we put all the selected data in the URL and submit it in GET method, or submit it in POST method?

Reply content:

Should we put all the selected data in the URL and submit it in GET method, or submit it in POST method?

Personally, I prefer to use GET, which is semantically suitable. Because GET is only a query and will not modify the data, and you are just transferring the data to other pages without any data modification. Submit the order on your order page and then use POST

Post submission is fine.
Of course, there is no problem with get submission.

post is safer.

Usually there is a hidden form, the value of this form is constantly modified with click operations, and then the data is submitted through the form

post is relatively safer

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!