The mysterious timestamp on GET script

599 views
Skip to first unread message

Bretto

unread,
Nov 20, 2012, 8:39:34 AM11/20/12
to ang...@googlegroups.com
I am using ng-include to load an html page with some script tags.

<script src="/experiment/1/js/app.js"></script>

the problem is that the partial is actualy making this call:


Where is this timestamp coming from ? does angular adds it ? the top level application doesn't seem to be suffering from this mysterious timestamp, is it pre-baked in angular that the partials should not be cached ? 

Pawel Kozlowski

unread,
Nov 20, 2012, 8:50:49 AM11/20/12
to ang...@googlegroups.com
Hi!

Very strange, I was always under an impression that AngularJS doesn't interpret script tags inside partials...
Could you prepare a small plunker to demonstrate? As I have said, I would be really surprised if those things would be coming from AngularJS...

Cheers,
Pawel

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en.
 
 



--
Question? Send a fiddle (http://jsfiddle.net/pkozlowski_opensource/Q2NpJ/) or a plunk (http://plnkr.co/)
Need help with jsFiddle? Check this: http://pkozlowskios.wordpress.com/2012/08/12/using-jsfiddle-with-angularjs/

Looking for UI widget library for AngularJS? Here you go: http://angular-ui.github.com/

Bretto

unread,
Nov 20, 2012, 6:39:46 PM11/20/12
to ang...@googlegroups.com
well this is all happening in a hack ;)

I am loading an ng-app inside and ng-app ( I am building a resume of experiments ) so the top app is an ng-app and the experiment which i load via a ng-view and a hacked version of ng-include that does not compile the child app ( to understand the purpose of the hacked ng-include check https://groups.google.com/forum/#!topic/angular/aPwRqqFTA28

the Included app is then bootstap manually and the script tags are being load but with a timestamp, I do remember reading somewhere that angular was doing something about the caching partials... I don't know any thought on what is generating this timestamp ?

Bretto

unread,
Jan 23, 2013, 1:27:49 AM1/23/13
to ang...@googlegroups.com
I am still trying to resolve where or what is adding timestamp to my script tags... Does anyone know if it's Angular that adds timestamp to async-script tags request ? You can see it on www.dewmap.com when you load an experiment, all the GET javascript call have a timestamp applied... 

Bretto

unread,
Jan 23, 2013, 2:28:21 AM1/23/13
to ang...@googlegroups.com
it got all resolved with this: 
jQuery.ajaxSetup({ cache:true});
Reply all
Reply to author
Forward
0 new messages