English 中文(简体)
接获要求
原标题:caching jquery get requests

我有一份申请,多次要求网络服务,并用这一数据显示地图。 i 在多个地方使用。 由于该地图需要时间来装载满足要求的最佳方式?

i) 考虑以下做法:

如果我只用马切切语来抓回答复,我的申请仍会提出要求。 为了进一步优化,可以使用jquery/javascript aching,并安装Http achingheader。

是否有任何其他方式可以用来改进业绩? 因为一意欲在所有网页上提出多重要求,显示同样的地图内容。

感谢

问题回答

处理你情况的最佳办法是,从服务器一侧为吉克人安装高频和超高频吉普车头盔,迫使吉克人在提出请求时使用海滩。 如果适用的话,我也建议从服务器上发送经过修改的日期,这样,在打满之后,JQuery首先询问,服务内容是否从最后修改的日期发生了变化。

如果你成功地应用了打头脑,客户密码在切期届满之前不会发出一份网上要求。

There are three main caching approaches (AFAIK) to improve performance :

  • Database caching. Caching the query and results at data level so that when a service issues a query, it doesn t execute every time. If your database query takes a lot of time, and different clients issue same service requests, you should think about it.
  • Server memory caching. If applied, the server does not executes the action and returns the content from cached memory. This approach is simpler from data caching mostly, and more beneficial.
  • Client caching via HTTP Headers: This is the most useful and fitting solution to your situation. If a client makes a HTTP Request to same service with same parameters more than one in the lifecycle, than there is no need to fetch the same response from server again and again (like static pages, images, css s and javascript files). You may use Cache-Control header and max-age attribute to achieve this purpose.




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签