Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to run jQuery on server side?

I am working on web page scraping has AJAX pagination's implemented, Since website is developed in asp i.e. page with extension .aspx I have tried submitting pagination forms to get data from other pages than first page but did not get any success, take a look here code I have used Scraping data from all asp.net pages with AJAX pagination implemented, So my question is how can I click on pagination links from php i.e. is it possible to run jQuery or javascript on server side?

I know Node.js can be used to run javascript on server side, but don't know how to use it with Apache and PHP

like image 841
Subodh Ghulaxe Avatar asked Feb 27 '13 10:02

Subodh Ghulaxe


People also ask

Is jQuery server side or client side?

jQuery is a client-side JavaScript library used in web development. jQuery includes several features to make web development easier, such as DOM traversal and manipulation, JSON parsing, visual effects, and more.

Does jQuery run on client side?

Remember that jQuery is client-side scripting. This means the browser must execute the code you create on your site.

Is jQuery installed on the server?

jQuery runs on the client side in the browser and doesn't even need a server.

Can JavaScript run in server side?

Server-side code can be written in any number of programming languages — examples of popular server-side web languages include PHP, Python, Ruby, C#, and JavaScript (NodeJS).


1 Answers

Use PhantomJS for interacting with HTML pages on other services. There are libraries for PHP like this.

CasperJS is a library built on top of PhantomJS that allows to automate some common testing / scripting tasks.

If you don't need to interact with remote pages but want to extract data from HTML using jQuery selectors, use Cheerio.

like image 198
Aleph Aleph Avatar answered Oct 12 '22 08:10

Aleph Aleph