Try our conversational search powered by Generative AI!

ANy Idea? from where these file came, native.history.js and find.js



with my bundled files these are extra files I can spot in my HTML.

Any idea what are these files and how these lines are generating?



Nov 10, 2014 13:59

As far as I know, they are coming from EPiServer Find, and are being put there as required client resources. They are used for the tracking functionality in Find.

Edited, Nov 10, 2014 14:50

Per Magne is correct they are inserted on the page if tracking is enabled in Find to be able to track clicks in the search results.


Nov 10, 2014 15:13

Is is possible to gzip and compress the files from EPiServer? I would also like to be able to add asyc or defer to them as I am able with other externl scripts.

Feb 05, 2015 14:35


What Eric says...
Google considers these 2 scripts to be render-blocking, which decreases performance and may ultimately lead to worse ranking within Googles search results.
(Googles documentation:


Sep 08, 2016 15:08
Sep 09, 2016 17:03

Thanks David,

I believe I've seen that page before, however it does not provide a way to specify attributes like 'async' or 'defer'. 
And Eric is in the comments there as well, asking the same thing as he does above :)

Sep 12, 2016 9:16

Hello Reinder

If you really want to customise how the scripts are rendered then you can create a custom version of the RequiredClientResources method found in EPiServer.Framework.Web.Mvc.Html.ClientResourceExtensions. This ultimately calls the Render method of EPiServer.Framework.Web.Resources.ClientResources which you will also need to provide a customised implementation to add the async attribute.

However it should be noted that it looks like the Find external scripts need to be loaded before the inline Find configuration script so if you go down this approach you should be careful about the order the JS is loaded. So if you ended up with the example below Find may not be configured correctly:

<script type="text/javascript" src="" aysnc></script>
<script type="text/javascript" src="" aysnc></script>
<!-- Script below may needs to be executed after the above scripts have loaded async --> 
<script type="text/javascript">
if(FindApi){var api = new FindApi();api.setApplicationUrl('/');api.setServiceApiBaseUrl('/find_v2/');api.processEventFromCurrentUri();api.bindWindowEvents();api.bindAClickEvent();api.sendBufferedEvents();}


Sep 12, 2016 10:48

Thanks David, I'm gonna look into this.

And good point about the order!

Sep 13, 2016 10:00
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.