Continually Updating a PDF File

6 0 3

Hi There,


I am wanting to attach a PDF file on my product pages that opens a new window with the PDF. My question is I need to continually update this PDF and want the link to remain the same. When I upload a new version it changes the URL so the link is no longer valid.


How would you go about this issue? One thought is to link it to my Box account where there is a version of the file that can be updated. Perhaps the link will remain the same that way. Any other options?


Thank you!

Shopify Expert
3468 543 819

Hi @RH_TB 

Where from you load this PDF file from shopfy server or other, generally if you want to keep same url and load different content then you have to use sub query string in url, like you have to pass and random number in url at end so browser load it everything new, other wise it load from catch.

For that you need jquery code to open url with query string. 

like: pdf_url?qry=15402

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
Shopify Partner
1279 169 401

You can upload your PDF in your files and make sure it is always the same name and then use a file url to link it, this is assuming you're linking it from your product.liquid and not using the product page editor. So go to settings, files, upload your pdf and let's say it's called "my-cool-pdf", then when you link it in product.liquid you could use a file URL like:


<a href="{{ 'my-cool-pdf.pdf' | file_url }}">Click here to get PDF</a>

So when you upload it, delete the previous one and make sure the new one has the same name.

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D