-1

I think beestings change the html every time.

this means html is not able to be cached.

am I right?

casperOne
  • 73,706
  • 19
  • 184
  • 253
Sungguk Lim
  • 6,109
  • 7
  • 43
  • 63
  • 13
    What are beestings? – AaronLS Mar 26 '10 at 13:09
  • 1
    I think bee stings are server-side script delimiters, i.e. `<% %>` http://stackoverflow.com/questions/1393819/what-is-the-difference-between-and-in-asp-net-mvc/1394504#1394504 – Greg Mar 26 '10 at 13:12

2 Answers2

0

I assume that by beesting, you mean some sort of random number in the URL.

Yes this will (usually) stop caching of pages. Some browser may still cache some or all of the page.

As to whether not to avoid it. Would caching a page stop it working as it should? If your page has fairly random content or content the changes often, users would not see this if the page is cached.

If you can avoid the need to stop caching, pages will be able to load faster. Which makes for a happy user.

Raj More
  • 47,048
  • 33
  • 131
  • 198
thecoshman
  • 8,394
  • 8
  • 55
  • 77
  • I so totally do know how to spell... see, if I deny it hard enough others will think it is them who is wrong. Thanks Raj! – thecoshman Mar 26 '10 at 13:22
  • OK then is it better to divide .js file , two part? I mean one part is .js using beestings, and another part is .js not using beestings. I think the second .js file can be cached – Sungguk Lim Mar 26 '10 at 13:36
  • Well yes you could do it that way. Bear in mind though that there is overhead to downloading a second JS file. you may be better of just putting all the code into the one and 'trimming the fat'. Do you really need to give the user different JavaScript code for each page though? – thecoshman Mar 26 '10 at 13:53
0

Old, old question, but anyway... no. You actually can "cache some or all of the response generated by an ASP.NET page, referred to in ASP.NET as output caching". You can read more at this Microsoft page.

For those still wandering, bee stings are special tags used in Microsoft's asp.NET to hold server-side code, much like PHP would do. It is, or was, very common to keep simple code inline, although having significant amount of code in bee stings is considered a bad practice by Microsoft themselves.

But as a rule, yeah, it can be cached.

isacvale
  • 627
  • 8
  • 13