简体   繁体   English

是否可以抓取一页以使用javascript和html将其呈现到另一页?

[英]is it possible to crawl one page to render it to another page in javascript and html?

At my company, we are debating this. 在我公司,我们正在对此进行辩论。 Say you have a color swatches that is already built in product detail page. 假设您有一个已经在产品详细信息页面中内置的色板。 At the category page, where each products are displayed, doesn't have color swatches. 在显示每个产品的类别页面上,没有色板。 So we are trying to build one. 因此,我们正在尝试建立一个。 I was suggesting if we can use jquery or javascript to crawl it, cache it or drag it from the pdp and display it in category page. 我建议我们是否可以使用jquery或javascript对其进行爬网,缓存或将其从pdp拖动并显示在类别页面中。 If we do that, it probably gonna be very slow because the category page is going to hit the server many times. 如果这样做,则可能会非常慢,因为类别页面将多次击中服务器。

Additional info, we don't have access to the php codes, so only javascript, jquery and html is possible. 其他信息,我们无权访问php代码,因此只能使用javascript,jquery和html。

I am actually looking for a way to do that. 我实际上正在寻找一种方法。 of course, it has to run fast too. 当然,它也必须快速运行。 Any suggestions of possibility anyone? 任何可能性的建议吗?

i dont think it is possible, your jquery or javascript should be native to the page to read its contents, ok lets assume it is native and you can read the content but where do you store ? 我不认为这是可能的,您的jquery或javascript应该是页面的本机才能读取其内容,好吧,假设它是本机的并且您可以读取内容,但应将其存储在哪里? with only javascript and jquery and not much of server side it is impossible 仅使用javascript和jquery而没有太多服务器端,这是不可能的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM