我不明白您为什么选择“更容易出现浏览器错误”。如果您向浏览器发送正确的库/代码,Javascript 将完全按照您想要的方式运行。
您可以查看哪个浏览器正在执行请求并向其发送正确的代码(读作:如果您有一些代码可以在 FF 和 Opera 但不能在 IE 中运行,请编写该代码的两个版本,一个用于每组浏览器.) 有一些库可以帮助您这样做。
Also, a comparison is not anything that should be done on the server side. SO, if you have a lot of traffic on your website, client-side work should be fine for that kind of stuff.
About the code-protection, you're right. Server-side won't let anybody read your code. So you must decide if server load is more important than people reading your code.
Also keep in mind that you can obfuscate your code. I know that's not the best solution, but it will keep away a lot of people not reading it.
EDIT:
Making it server side will make things work as expected on all devices (as your already said).
But there are some things you need to do in order to preserve your server's load from going to 100%.
Chandra Sekhar Walajap
already told you about the benefit of using some kind of cache for the results. I'd personally go a little bit further as you're just scraping all those pages.
I'd create a scraper that will run, let's say, every 24 hours and fetch/scrape each product. Then I'd save all those products somewhere (read as in a database or whatever you want). This way, when a user makes a request for a comparison between products A and B you won't need to fetch/scrape all the sites, instead of that you'll just have to look for those products in the place where you saved them and show them to the user.
Note that this will preserve a lot of bandwidth only if you have a lot of users comparing a lot of products.
On the other side, if you have a few users searching only for a few products, making that kind of solution won't benefit you at all, because you know, fetching everything from all the sites every 24 hours is a lot of usage, both in CPU and bandwidth.
About the server load: I can't say. It depends on so much things that it's nearly impossible to say. You need to consider how big are the website that you're scraping , how many products are there on each website? What's the hardware you're using? You'd be better by making some simple example using cURL and fetching everything from one of the sites. Then see how that impacts on the performance and decide.