function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vikash TiwaryVikash Tiwary 

Limit force.com site page view count and API count increase

Hello,  My requirement is to get the XML from salesforce database. When I tried exposing the webservice over sites it contributes to page view count which I do not want to increase. Alternatively, if we tried save page view count then we needed to authorize the user and then use access token in each API call to access webservice and get the XML directly but this contributes to API count. Because I am already near to API count and page views I want some alternative solution. I am open to use some middleware like Heroku if required.

Thank you in advance!!
SandhyaSandhya (Salesforce Developers) 
Hi Vikash Tiwary,


Some Options
You could refactor parts of your pages to get rid of unnecessary ajax requests or look for inefficient uses. If you can determine your high traffic pages, and make doubly sure that they aren't making unnecessary ajax calls.
Add as much as possible to the static resources as they don't count.
You could offload some of your pages to a different location. If you have some high traffic static pages you could serve them from somewhere else (e.g., Heroku, Amazon, etc.).
You could talk to your SFDC representative about purchasing more page views for your org. This might end up being the best option as it doesn't have any other costs such as development time associated with it.

To reduce API calls

https://help.salesforce.com/HTViewSolution?id=000003706&language=en_US
 
All SOAP API calls made by Heroku Connect will no longer count towards your API usage limits.  Customers can now focus on using Heroku Connect to build apps spanning Salesforce/Heroku while preserving their API usage for other use cases.

Please refer below link on how to start with Heroku.

https://developer.salesforce.com/blogs/developer-relations/2015/07/heroku-connect-now-free-salesforce-api-calls.html
 
Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution. 
 
Thanks and Regards
Sandhya