Drongo_III Posted April 7, 2015 Share Posted April 7, 2015 Hi Guys I'm not entirely sure this is the right section but I need a little advice. Three quick questions: 1) Can you force caching on a script (js) that's loaded from an external source over which you have no direct control. So lets say you have a script being loaded on a page async. - i.e. via createNewElement... Can you force that script to cache? 2) This may actually answer question one - is an external script served under the headers of the source server? So if that server had caching set on all script files and I incorporated a script from that server into a page on my server would that file be subject to the source servers caching? 3) If point two is the case - then does that count for all files incorporated from an external source? Thanks, Drongo Link to comment https://forums.phpfreaks.com/topic/295345-caching-external-javascript/ Share on other sites More sharing options...
requinix Posted April 7, 2015 Share Posted April 7, 2015 1) Can you force caching on a script (js) that's loaded from an external source over which you have no direct control. So lets say you have a script being loaded on a page async. - i.e. via createNewElement... Can you force that script to cache?No. Once you provide the URL you stop being involved. 2) This may actually answer question one - is an external script served under the headers of the source server? So if that server had caching set on all script files and I incorporated a script from that server into a page on my server would that file be subject to the source servers caching?Right. 3) If point two is the case - then does that count for all files incorporated from an external source?Yes. Link to comment https://forums.phpfreaks.com/topic/295345-caching-external-javascript/#findComment-1508479 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.